Compare commits
203 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12081cec28 | |||
| 27a54b0034 | |||
| c1aee47e53 | |||
| e59d50923b | |||
| e5fca60809 | |||
| f7631e5201 | |||
| 4604ae3558 | |||
| 624eb0566f | |||
| f45efb2310 | |||
| c32bfd55d0 | |||
| db65ef9e15 | |||
| d2a6a27200 | |||
| 6bad0e177f | |||
| 667b8fde7c | |||
| 48d0063167 | |||
| 13d89a3857 | |||
| df7bb978b8 | |||
| 088be26abf | |||
| 2e81f09a85 | |||
| 21692af684 | |||
| 6c36f856e6 | |||
| 33b90967c6 | |||
| 47ea4e3646 | |||
| cc41ca8d82 | |||
| 554b1a662e | |||
| 10a0745449 | |||
| f47b202499 | |||
| 1a0eb0cb31 | |||
| 33176f40fa | |||
| bbb6d16483 | |||
| 317321d46c | |||
| 57baab72d5 | |||
| 13401bc486 | |||
| 91d8e8aa1f | |||
| 65288427f3 | |||
| a234c6f6f1 | |||
| f1819fc61c | |||
| e67c79992c | |||
| 209cab548b | |||
| fa737c7c80 | |||
| 4811a37fe7 | |||
| d43acd1678 | |||
| 2850e07360 | |||
| 9ae9a6df88 | |||
| f5206ce8bf | |||
| f4dea984be | |||
| 8a7af066d9 | |||
| bbb52b6ade | |||
| 7fe2c09bca | |||
| a5be2180ea | |||
| 6e5db6e147 | |||
| 589156d963 | |||
| 54c5d41c67 | |||
| 0c2a5343ee | |||
| cbedfdc767 | |||
| 566770255c | |||
| 8cac7b43fb | |||
| 3c0490e659 | |||
| 55da29a72c | |||
| 93864624fd | |||
| db66fa17cd | |||
| becbf3c682 | |||
| da22e9217c | |||
| f7b4f710ef | |||
| 2a248795b1 | |||
| 08088592f9 | |||
| ad24522010 | |||
| 8a1186676f | |||
| 1f0fd32470 | |||
| 2b4d5f9c92 | |||
| 7592a8d888 | |||
| e621fb46d0 | |||
| 94e9952e82 | |||
| 71ad5dd682 | |||
| c9102a5602 | |||
| 1a34b2fef9 | |||
| a257412294 | |||
| daabc36730 | |||
| ed1ac1b238 | |||
| 503616820b | |||
| 84863dc5d5 | |||
| 0e09b44db3 | |||
| ef883cb163 | |||
| 7934ad8fd5 | |||
| 2631c94c03 | |||
| 5db3c25d77 | |||
| ba92a9098d | |||
| 5ef1a25bb5 | |||
| ee58cd36f0 | |||
| 1fae546b34 | |||
| 00dbe5f522 | |||
| e4b20c596a | |||
| 341eab87ab | |||
| b76ddfd303 | |||
| fa120a280c | |||
| 99bcefcfe8 | |||
| 704a4becb4 | |||
| b3d50be2f9 | |||
| 629d16b4f1 | |||
| ea551e25e5 | |||
| 55d69bdcf7 | |||
| 34c4d1e644 | |||
| 95e5751c3d | |||
| ff180ec2a4 | |||
| 3b6accaa20 | |||
| a6756b6f77 | |||
| 80bcd2f225 | |||
| 40970b417a | |||
| 647e3fe318 | |||
| 6f2fcbaf3e | |||
| 295f882d45 | |||
| 60ecebf9ff | |||
| 02ecb31ae7 | |||
| 51c736f7f9 | |||
| 1b9f5457f2 | |||
| 0be02be5f7 | |||
| a52227b1ea | |||
| e13c3bf106 | |||
| 20bb3dae68 | |||
| cb2a22863c | |||
| 82bc1f4ff2 | |||
| 970a11c758 | |||
| ba09f8634e | |||
| 7c277f129b | |||
| b695326901 | |||
| 503d91396e | |||
| ac401afe20 | |||
| 63092f1ed6 | |||
| 8d548dee9c | |||
| 60758454ed | |||
| a328be0e1c | |||
| 05864bcac5 | |||
| e2fbc74a58 | |||
| 238bdbb1ce | |||
| 144b8dc66e | |||
| 5f9a01ae2e | |||
| a6386e64d9 | |||
| 551eec6496 | |||
| a24c4ada62 | |||
| 2a86d67ca9 | |||
| 5c4a8adf9b | |||
| 0cc2534628 | |||
| 2a861dca1b | |||
| 16715a8c08 | |||
| 4c5500c490 | |||
| 75b4b4e4d0 | |||
| b643cb5030 | |||
| a666749d85 | |||
| f710918411 | |||
| 1585fc2659 | |||
| a00170b37a | |||
| 00836e0695 | |||
| c06d75e292 | |||
| a6acc66099 | |||
| c822538fb7 | |||
| 9072dc3780 | |||
| a9ed233d77 | |||
| 0635302dac | |||
| 12de367ba1 | |||
| a68dba11a2 | |||
| 60784d2588 | |||
| 5d26914967 | |||
| 4c4356dac7 | |||
| 50d301e8cc | |||
| bfbb85feee | |||
| 9783731396 | |||
| 9ff14634dd | |||
| 42970892ba | |||
| 2bb8cfc4a1 | |||
| 902f610703 | |||
| cb6b2721fc | |||
| d7aa5f1739 | |||
| e67f863235 | |||
| 5f6660d642 | |||
| 437e698d10 | |||
| 9a187ac36b | |||
| 2c04b2e5cc | |||
| a6c10569e0 | |||
| f60be49005 | |||
| b8b42114b6 | |||
| 69b2734987 | |||
| a52a8dfe36 | |||
| b73a4ba6c0 | |||
| 98628b887e | |||
| 5152600fd9 | |||
| c9b9646bbb | |||
| c6732698e8 | |||
| 89ab41da44 | |||
| 2b5bb35e21 | |||
| 68ee954dd3 | |||
| a47a5ed09a | |||
| b272f1f2bb | |||
| 5aba0cf14f | |||
| a1c3a9fb30 | |||
| 1e61027dbd | |||
| 4d26959075 | |||
| 799c0530be | |||
| 6cea8cbcf8 | |||
| 85827e5d29 | |||
| 96432122a2 | |||
| 6e55664281 | |||
| b348229691 | |||
| 8d20b2f190 |
@@ -3,18 +3,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 16
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 16.0.32002.261
|
VisualStudioVersion = 16.0.32002.261
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Icarus", "Icarus/Icarus.vbproj", "{BCDE0368-2C69-4948-8723-D0FE71417986}"
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Icarus", "Icarus\Icarus.vbproj", "{BCDE0368-2C69-4948-8723-D0FE71417986}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
Release|x64 = Release|x64
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{BCDE0368-2C69-4948-8723-D0FE71417986}.Debug|x64.ActiveCfg = Debug|x64
|
{BCDE0368-2C69-4948-8723-D0FE71417986}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{BCDE0368-2C69-4948-8723-D0FE71417986}.Debug|x64.Build.0 = Debug|x64
|
{BCDE0368-2C69-4948-8723-D0FE71417986}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{BCDE0368-2C69-4948-8723-D0FE71417986}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{BCDE0368-2C69-4948-8723-D0FE71417986}.Debug|x86.Build.0 = Debug|x86
|
||||||
{BCDE0368-2C69-4948-8723-D0FE71417986}.Release|x64.ActiveCfg = Release|x64
|
{BCDE0368-2C69-4948-8723-D0FE71417986}.Release|x64.ActiveCfg = Release|x64
|
||||||
{BCDE0368-2C69-4948-8723-D0FE71417986}.Release|x64.Build.0 = Release|x64
|
{BCDE0368-2C69-4948-8723-D0FE71417986}.Release|x64.Build.0 = Release|x64
|
||||||
|
{BCDE0368-2C69-4948-8723-D0FE71417986}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{BCDE0368-2C69-4948-8723-D0FE71417986}.Release|x86.Build.0 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -1,52 +1,81 @@
|
|||||||
<Window x:Class="AboutBoxV"
|
<Window x:Class="AboutBoxV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
|
Title="AboutBox"
|
||||||
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
|
Height="486"
|
||||||
|
Width="735"
|
||||||
|
WindowStyle="None"
|
||||||
|
ResizeMode="NoResize"
|
||||||
|
AllowsTransparency="True"
|
||||||
|
Background="Transparent"
|
||||||
|
ShowInTaskbar="False"
|
||||||
|
WindowStartupLocation="CenterOwner">
|
||||||
|
|
||||||
<Border BorderThickness="2" BorderBrush="LightBlue">
|
<Border Style="{StaticResource WhiteBottomBlueRow_Border}">
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="5*"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="0.25*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="2.5*"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="0.35*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.35*"/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Column="1" Grid.Row="1">
|
<Grid Grid.Column="3" Grid.Row="1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="50"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Border Name="LogoBrd" Grid.Column="1" Background="White">
|
<Grid.RowDefinitions>
|
||||||
<Image Source="/Resources/AboutBoxImage.png" Stretch="Uniform"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Border>
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Image Grid.RowSpan="2"
|
||||||
|
Source="/Resources/AboutBox/IcarusLogo.png"
|
||||||
|
Height="65"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
Name="DescriptionLbl"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Style="{StaticResource Version_AboutBox_TextBlock}"/>
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
Name="VersionLbl"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Style="{StaticResource Version_AboutBox_TextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
<Image Grid.Column="1"
|
||||||
VerticalAlignment="Center" FontSize="18" />
|
Grid.Row="3"
|
||||||
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
|
Source="/Resources/AboutBox/EgalwareLogo.png"
|
||||||
VerticalAlignment="Center" FontSize="18"/>
|
Height="190"
|
||||||
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
|
Style="{StaticResource Button_Image}"/>
|
||||||
VerticalAlignment="Center" FontSize="12" />
|
<TextBox Name="InfoLbl"
|
||||||
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
|
Grid.Column="3"
|
||||||
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
|
Grid.Row="3"
|
||||||
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
|
Style="{StaticResource AboutBox_TextBox}"/>
|
||||||
Margin="100,0"/>
|
<TextBlock Name="CopyrightLbl"
|
||||||
|
Grid.Column="3"
|
||||||
|
Grid.Row="5"
|
||||||
|
Style="{StaticResource Copyright_AboutBox_TextBlock}"/>
|
||||||
|
<Button Grid.Column="3"
|
||||||
|
Grid.Row="7"
|
||||||
|
IsCancel="True"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -16,30 +16,29 @@ Public Class AboutBoxV
|
|||||||
Dim sKlev As String = Map.refMainWindowVM.MainWindowM.nKeyLevel.ToString()
|
Dim sKlev As String = Map.refMainWindowVM.MainWindowM.nKeyLevel.ToString()
|
||||||
Dim sOpts As String = Map.refMainWindowVM.MainWindowM.nKeyOptions.ToString()
|
Dim sOpts As String = Map.refMainWindowVM.MainWindowM.nKeyOptions.ToString()
|
||||||
Dim sLeftDays As String = ""
|
Dim sLeftDays As String = ""
|
||||||
Dim nLeftDays As Integer
|
Dim nLeftDays As Integer
|
||||||
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
|
If EgtGetKeyLeftDays(nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays = " (" & nLeftDays.ToString() & ")"
|
||||||
sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
|
sInfo = If(EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
|
||||||
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
|
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
|
||||||
" Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() &
|
" Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() &
|
||||||
" Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() &
|
" Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() &
|
||||||
" Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine
|
" Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine
|
||||||
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
||||||
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
|
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
|
||||||
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
|
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
|
||||||
Dim sOpSys As String = String.Empty
|
Dim sOpSys As String = String.Empty
|
||||||
EgtGetOsInfo( sOpSys)
|
EgtGetOsInfo(sOpSys)
|
||||||
sInfo &= sOpSys & Environment.NewLine
|
sInfo &= sOpSys & Environment.NewLine
|
||||||
Dim sCPU As String = String.Empty
|
Dim sCPU As String = String.Empty
|
||||||
EgtGetCpuInfo( sCPU)
|
EgtGetCpuInfo(sCPU)
|
||||||
sInfo &= sCPU & Environment.NewLine
|
sInfo &= sCPU & Environment.NewLine
|
||||||
Dim sMem As String = String.Empty
|
Dim sMem As String = String.Empty
|
||||||
EgtGetMemoryInfo( sMem)
|
EgtGetMemoryInfo(sMem)
|
||||||
sInfo &= sMem & Environment.NewLine
|
sInfo &= sMem & Environment.NewLine
|
||||||
Dim sScene As String = String.Empty
|
Dim sScene As String = String.Empty
|
||||||
EgtGetSceneInfo(sScene)
|
EgtGetSceneInfo(sScene)
|
||||||
sInfo &= sScene
|
sInfo &= sScene
|
||||||
InfoLbl.Text = sInfo
|
InfoLbl.Text = sInfo
|
||||||
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,275 +0,0 @@
|
|||||||
' Follow steps 1a or 1b and then 2 to use this custom control in a XAML file.
|
|
||||||
'
|
|
||||||
' Step 1a) Using this custom control in a XAML file that exists in the current project.
|
|
||||||
' Add this XmlNamespace attribute to the root element of the markup file where it is
|
|
||||||
' to be used:
|
|
||||||
'
|
|
||||||
' xmlns:MyNamespace="clr-namespace:Icarus"
|
|
||||||
'
|
|
||||||
'
|
|
||||||
' Step 1b) Using this custom control in a XAML file that exists in a different project.
|
|
||||||
' Add this XmlNamespace attribute to the root element of the markup file where it is
|
|
||||||
' to be used:
|
|
||||||
'
|
|
||||||
' xmlns:MyNamespace="clr-namespace:Icarus;assembly=Icarus"
|
|
||||||
'
|
|
||||||
' You will also need to add a project reference from the project where the XAML file lives
|
|
||||||
' to this project and Rebuild to avoid compilation errors:
|
|
||||||
'
|
|
||||||
' Right click on the target project in the Solution Explorer and
|
|
||||||
' "Add Reference"->"Projects"->[Browse to and select this project]
|
|
||||||
'
|
|
||||||
'
|
|
||||||
' Step 2)
|
|
||||||
' Go ahead and use your control in the XAML file. Note that Intellisense in the
|
|
||||||
' XML editor does not currently work on custom controls and its child elements.
|
|
||||||
'
|
|
||||||
' <MyNamespace:AirspacePopup/>
|
|
||||||
'
|
|
||||||
|
|
||||||
Imports System.Windows.Controls.Primitives
|
|
||||||
Imports System
|
|
||||||
Imports System.ComponentModel
|
|
||||||
Imports System.Diagnostics
|
|
||||||
Imports System.Runtime.InteropServices
|
|
||||||
Imports System.Windows
|
|
||||||
Imports System.Windows.Input
|
|
||||||
Imports System.Windows.Interop
|
|
||||||
|
|
||||||
Public Class AirspacePopup
|
|
||||||
Inherits Popup
|
|
||||||
|
|
||||||
Public Shared ReadOnly IsTopmostProperty As DependencyProperty = DependencyProperty.Register("IsTopmost", GetType(Boolean), GetType(AirspacePopup), New FrameworkPropertyMetadata(False, AddressOf OnIsTopmostChanged))
|
|
||||||
Public Shared ReadOnly FollowPlacementTargetProperty As DependencyProperty = DependencyProperty.RegisterAttached("FollowPlacementTarget", GetType(Boolean), GetType(AirspacePopup), New UIPropertyMetadata(False))
|
|
||||||
Public Shared ReadOnly AllowOutsideScreenPlacementProperty As DependencyProperty = DependencyProperty.RegisterAttached("AllowOutsideScreenPlacement", GetType(Boolean), GetType(AirspacePopup), New UIPropertyMetadata(False))
|
|
||||||
Public Shared ReadOnly ParentWindowProperty As DependencyProperty = DependencyProperty.RegisterAttached("ParentWindow", GetType(Window), GetType(AirspacePopup), New UIPropertyMetadata(Nothing, AddressOf ParentWindowPropertyChanged))
|
|
||||||
|
|
||||||
Private Shared Sub OnIsTopmostChanged(ByVal source As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
|
|
||||||
Dim airspacePopup As AirspacePopup = TryCast(source, AirspacePopup)
|
|
||||||
airspacePopup.SetTopmostState(airspacePopup.IsTopmost)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Shared Sub ParentWindowPropertyChanged(ByVal source As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
|
|
||||||
Dim airspacePopup As AirspacePopup = TryCast(source, AirspacePopup)
|
|
||||||
airspacePopup.ParentWindowChanged()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private m_appliedTopMost As Boolean?
|
|
||||||
Private m_alreadyLoaded As Boolean
|
|
||||||
Private m_parentWindow As Window
|
|
||||||
|
|
||||||
Shared Sub New()
|
|
||||||
'This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class.
|
|
||||||
'This style is defined in themes\generic.xaml
|
|
||||||
DefaultStyleKeyProperty.OverrideMetadata(GetType(AirspacePopup), New FrameworkPropertyMetadata(GetType(AirspacePopup)))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub New()
|
|
||||||
AddHandler Loaded, AddressOf OnPopupLoaded
|
|
||||||
AddHandler Unloaded, AddressOf OnPopupUnloaded
|
|
||||||
Dim descriptor As DependencyPropertyDescriptor = DependencyPropertyDescriptor.FromProperty(PlacementTargetProperty, GetType(AirspacePopup))
|
|
||||||
descriptor.AddValueChanged(Me, AddressOf PlacementTargetChanged)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Property IsTopmost As Boolean
|
|
||||||
Get
|
|
||||||
Return CBool(GetValue(IsTopmostProperty))
|
|
||||||
End Get
|
|
||||||
Set(ByVal value As Boolean)
|
|
||||||
SetValue(IsTopmostProperty, value)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property FollowPlacementTarget As Boolean
|
|
||||||
Get
|
|
||||||
Return CBool(GetValue(FollowPlacementTargetProperty))
|
|
||||||
End Get
|
|
||||||
Set(ByVal value As Boolean)
|
|
||||||
SetValue(FollowPlacementTargetProperty, value)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property AllowOutsideScreenPlacement As Boolean
|
|
||||||
Get
|
|
||||||
Return CBool(GetValue(AllowOutsideScreenPlacementProperty))
|
|
||||||
End Get
|
|
||||||
Set(ByVal value As Boolean)
|
|
||||||
SetValue(AllowOutsideScreenPlacementProperty, value)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property ParentWindow As Window
|
|
||||||
Get
|
|
||||||
Return CType(GetValue(ParentWindowProperty), Window)
|
|
||||||
End Get
|
|
||||||
Set(ByVal value As Window)
|
|
||||||
SetValue(ParentWindowProperty, value)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Sub ParentWindowChanged()
|
|
||||||
If ParentWindow IsNot Nothing Then
|
|
||||||
AddHandler ParentWindow.LocationChanged, Function(sender, e2)
|
|
||||||
UpdatePopupPosition()
|
|
||||||
End Function
|
|
||||||
|
|
||||||
AddHandler ParentWindow.SizeChanged, Function(sender, e2)
|
|
||||||
UpdatePopupPosition()
|
|
||||||
End Function
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub PlacementTargetChanged(ByVal sender As Object, ByVal e As EventArgs)
|
|
||||||
Dim placementTarget As FrameworkElement = TryCast(Me.PlacementTarget, FrameworkElement)
|
|
||||||
|
|
||||||
If placementTarget IsNot Nothing Then
|
|
||||||
AddHandler placementTarget.SizeChanged, Function(sender2, e2)
|
|
||||||
UpdatePopupPosition()
|
|
||||||
End Function
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub UpdatePopupPosition()
|
|
||||||
Dim placementTarget As FrameworkElement = TryCast(Me.PlacementTarget, FrameworkElement)
|
|
||||||
Dim child As FrameworkElement = TryCast(Me.Child, FrameworkElement)
|
|
||||||
|
|
||||||
If PresentationSource.FromVisual(placementTarget) IsNot Nothing AndAlso AllowOutsideScreenPlacement = True Then
|
|
||||||
Dim leftOffset As Double = CutLeft(placementTarget)
|
|
||||||
Dim topOffset As Double = CutTop(placementTarget)
|
|
||||||
Dim rightOffset As Double = CutRight(placementTarget)
|
|
||||||
Dim bottomOffset As Double = CutBottom(placementTarget)
|
|
||||||
Debug.WriteLine(bottomOffset)
|
|
||||||
Me.Width = Math.Max(0, Math.Min(leftOffset, rightOffset) + placementTarget.ActualWidth)
|
|
||||||
Me.Height = Math.Max(0, Math.Min(topOffset, bottomOffset) + placementTarget.ActualHeight)
|
|
||||||
|
|
||||||
If child IsNot Nothing Then
|
|
||||||
child.Margin = New Thickness(leftOffset, topOffset, rightOffset, bottomOffset)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If FollowPlacementTarget = True Then
|
|
||||||
Me.HorizontalOffset += 0.01
|
|
||||||
Me.HorizontalOffset -= 0.01
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function CutLeft(ByVal placementTarget As FrameworkElement) As Double
|
|
||||||
Dim point As Point = placementTarget.PointToScreen(New Point(0, placementTarget.ActualWidth))
|
|
||||||
Return Math.Min(0, point.X)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Function CutTop(ByVal placementTarget As FrameworkElement) As Double
|
|
||||||
Dim point As Point = placementTarget.PointToScreen(New Point(placementTarget.ActualHeight, 0))
|
|
||||||
Return Math.Min(0, point.Y)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Function CutRight(ByVal placementTarget As FrameworkElement) As Double
|
|
||||||
Dim point As Point = placementTarget.PointToScreen(New Point(0, placementTarget.ActualWidth))
|
|
||||||
point.X += placementTarget.ActualWidth
|
|
||||||
Return Math.Min(0, SystemParameters.VirtualScreenWidth - (Math.Max(SystemParameters.VirtualScreenWidth, point.X)))
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Function CutBottom(ByVal placementTarget As FrameworkElement) As Double
|
|
||||||
Dim point As Point = placementTarget.PointToScreen(New Point(placementTarget.ActualHeight, 0))
|
|
||||||
point.Y += placementTarget.ActualHeight
|
|
||||||
Return Math.Min(0, SystemParameters.VirtualScreenHeight - (Math.Max(SystemParameters.VirtualScreenHeight, point.Y)))
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Sub OnPopupLoaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
|
|
||||||
If m_alreadyLoaded Then Return
|
|
||||||
m_alreadyLoaded = True
|
|
||||||
|
|
||||||
If Child IsNot Nothing Then
|
|
||||||
Child.[AddHandler](PreviewMouseLeftButtonDownEvent, New MouseButtonEventHandler(AddressOf OnChildPreviewMouseLeftButtonDown), True)
|
|
||||||
End If
|
|
||||||
|
|
||||||
m_parentWindow = Window.GetWindow(Me)
|
|
||||||
If m_parentWindow Is Nothing Then Return
|
|
||||||
AddHandler m_parentWindow.Activated, AddressOf OnParentWindowActivated
|
|
||||||
AddHandler m_parentWindow.Deactivated, AddressOf OnParentWindowDeactivated
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnPopupUnloaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
|
|
||||||
If m_parentWindow Is Nothing Then Return
|
|
||||||
RemoveHandler m_parentWindow.Activated, AddressOf OnParentWindowActivated
|
|
||||||
RemoveHandler m_parentWindow.Deactivated, AddressOf OnParentWindowDeactivated
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnParentWindowActivated(ByVal sender As Object, ByVal e As EventArgs)
|
|
||||||
SetTopmostState(True)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnParentWindowDeactivated(ByVal sender As Object, ByVal e As EventArgs)
|
|
||||||
If IsTopmost = False Then
|
|
||||||
SetTopmostState(IsTopmost)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnChildPreviewMouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
|
|
||||||
SetTopmostState(True)
|
|
||||||
|
|
||||||
If Not m_parentWindow.IsActive AndAlso IsTopmost = False Then
|
|
||||||
m_parentWindow.Activate()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Overrides Sub OnOpened(ByVal e As EventArgs)
|
|
||||||
SetTopmostState(IsTopmost)
|
|
||||||
MyBase.OnOpened(e)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SetTopmostState(ByVal isTop As Boolean)
|
|
||||||
If m_appliedTopMost.HasValue AndAlso m_appliedTopMost = isTop Then
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Child Is Nothing Then Return
|
|
||||||
Dim hwndSource = TryCast((PresentationSource.FromVisual(Child)), HwndSource)
|
|
||||||
If hwndSource Is Nothing Then Return
|
|
||||||
Dim hwnd = hwndSource.Handle
|
|
||||||
Dim rect As RECT
|
|
||||||
If Not GetWindowRect(hwnd, rect) Then Return
|
|
||||||
Debug.WriteLine("setting z-order " & isTop)
|
|
||||||
|
|
||||||
If isTop Then
|
|
||||||
SetWindowPos(hwnd, HWND_TOPMOST, rect.Left, rect.Top, CInt(Width), CInt(Height), TOPMOST_FLAGS)
|
|
||||||
Else
|
|
||||||
SetWindowPos(hwnd, HWND_BOTTOM, rect.Left, rect.Top, CInt(Width), CInt(Height), TOPMOST_FLAGS)
|
|
||||||
SetWindowPos(hwnd, HWND_TOP, rect.Left, rect.Top, CInt(Width), CInt(Height), TOPMOST_FLAGS)
|
|
||||||
SetWindowPos(hwnd, HWND_NOTOPMOST, rect.Left, rect.Top, CInt(Width), CInt(Height), TOPMOST_FLAGS)
|
|
||||||
End If
|
|
||||||
|
|
||||||
m_appliedTopMost = isTop
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
<StructLayout(LayoutKind.Sequential)>
|
|
||||||
Public Structure RECT
|
|
||||||
Public Left As Integer
|
|
||||||
Public Top As Integer
|
|
||||||
Public Right As Integer
|
|
||||||
Public Bottom As Integer
|
|
||||||
End Structure
|
|
||||||
|
|
||||||
<DllImport("user32.dll")>
|
|
||||||
Private Shared Function GetWindowRect(ByVal hWnd As IntPtr, <Out> ByRef lpRect As RECT) As Boolean
|
|
||||||
End Function
|
|
||||||
<DllImport("user32.dll")>
|
|
||||||
Private Shared Function SetWindowPos(ByVal hWnd As IntPtr, ByVal hWndInsertAfter As IntPtr, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal uFlags As UInteger) As Boolean
|
|
||||||
End Function
|
|
||||||
Shared ReadOnly HWND_TOPMOST As IntPtr = New IntPtr(-1)
|
|
||||||
Shared ReadOnly HWND_NOTOPMOST As IntPtr = New IntPtr(-2)
|
|
||||||
Shared ReadOnly HWND_TOP As IntPtr = New IntPtr(0)
|
|
||||||
Shared ReadOnly HWND_BOTTOM As IntPtr = New IntPtr(1)
|
|
||||||
Private Const SWP_NOSIZE As UInt32 = &H1
|
|
||||||
Const SWP_NOMOVE As UInt32 = &H2
|
|
||||||
Const SWP_NOZORDER As UInt32 = &H4
|
|
||||||
Const SWP_NOREDRAW As UInt32 = &H8
|
|
||||||
Const SWP_NOACTIVATE As UInt32 = &H10
|
|
||||||
Const SWP_FRAMECHANGED As UInt32 = &H20
|
|
||||||
Const SWP_SHOWWINDOW As UInt32 = &H40
|
|
||||||
Const SWP_HIDEWINDOW As UInt32 = &H80
|
|
||||||
Const SWP_NOCOPYBITS As UInt32 = &H100
|
|
||||||
Const SWP_NOOWNERZORDER As UInt32 = &H200
|
|
||||||
Const SWP_NOSENDCHANGING As UInt32 = &H400
|
|
||||||
Const TOPMOST_FLAGS As UInt32 = SWP_NOACTIVATE Or SWP_NOOWNERZORDER Or SWP_NOSIZE Or SWP_NOMOVE Or SWP_NOREDRAW Or SWP_NOSENDCHANGING
|
|
||||||
End Class
|
|
||||||
@@ -5,6 +5,14 @@
|
|||||||
Protected Overrides Sub OnStartup(e As StartupEventArgs)
|
Protected Overrides Sub OnStartup(e As StartupEventArgs)
|
||||||
MyBase.OnStartup(e)
|
MyBase.OnStartup(e)
|
||||||
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
||||||
|
If e.Args.Count = 0 Then
|
||||||
|
' creo finestra SplashScreen
|
||||||
|
Dim SplashScreen As New SplashScreen
|
||||||
|
Me.MainWindow = SplashScreen
|
||||||
|
Me.MainWindow.Show()
|
||||||
|
Map.SetRefSplashScreen(SplashScreen)
|
||||||
|
End If
|
||||||
|
|
||||||
' Creo la View principale
|
' Creo la View principale
|
||||||
Me.MainWindow = New MainWindowV
|
Me.MainWindow = New MainWindowV
|
||||||
' Mostro la View principale
|
' Mostro la View principale
|
||||||
|
|||||||
@@ -0,0 +1,165 @@
|
|||||||
|
Imports System.Globalization
|
||||||
|
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox
|
||||||
|
Imports System.Windows.Media.Media3D
|
||||||
|
|
||||||
|
Public Module TreeViewItemHelper
|
||||||
|
|
||||||
|
' Gestione MouseOver come in ListBox
|
||||||
|
Private CurrentItem As TreeViewItem
|
||||||
|
Private ReadOnly UpdateOverItemEvent As RoutedEvent = EventManager.RegisterRoutedEvent("UpdateOverItem", RoutingStrategy.Bubble, GetType(RoutedEventHandler), GetType(TreeViewItemHelper))
|
||||||
|
Private ReadOnly IsMouseDirectlyOverItemKey As DependencyPropertyKey = DependencyProperty.RegisterAttachedReadOnly("IsMouseDirectlyOverItem", GetType(Boolean), GetType(TreeViewItemHelper), New FrameworkPropertyMetadata(Nothing, New CoerceValueCallback(AddressOf CalculateIsMouseDirectlyOverItem)))
|
||||||
|
Public ReadOnly IsMouseDirectlyOverItemProperty As DependencyProperty = IsMouseDirectlyOverItemKey.DependencyProperty
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
EventManager.RegisterClassHandler(GetType(TreeViewItem), UIElement.MouseEnterEvent, New MouseEventHandler(AddressOf OnMouseTransition), True)
|
||||||
|
EventManager.RegisterClassHandler(GetType(TreeViewItem), UIElement.MouseLeaveEvent, New MouseEventHandler(AddressOf OnMouseTransition), True)
|
||||||
|
EventManager.RegisterClassHandler(GetType(TreeViewItem), UpdateOverItemEvent, New RoutedEventHandler(AddressOf OnUpdateOverItem))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Function GetIsMouseDirectlyOverItem(ByVal obj As DependencyObject) As Boolean
|
||||||
|
Return CBool(obj.GetValue(IsMouseDirectlyOverItemProperty))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function CalculateIsMouseDirectlyOverItem(ByVal item As DependencyObject, ByVal value As Object) As Object
|
||||||
|
Return item Is CurrentItem
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub OnUpdateOverItem(ByVal sender As Object, ByVal e As RoutedEventArgs)
|
||||||
|
CurrentItem = TryCast(sender, TreeViewItem)
|
||||||
|
CurrentItem.InvalidateProperty(IsMouseDirectlyOverItemProperty)
|
||||||
|
e.Handled = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnMouseTransition(ByVal sender As Object, ByVal e As MouseEventArgs)
|
||||||
|
SyncLock IsMouseDirectlyOverItemProperty
|
||||||
|
|
||||||
|
If Not IsNothing(CurrentItem) Then
|
||||||
|
Dim oldItem As DependencyObject = CurrentItem
|
||||||
|
CurrentItem = Nothing
|
||||||
|
oldItem.InvalidateProperty(IsMouseDirectlyOverItemProperty)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Mouse.DirectlyOver?.RaiseEvent(New RoutedEventArgs(UpdateOverItemEvent))
|
||||||
|
End SyncLock
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Gestione click destro del mouse che seleziona l'elemento
|
||||||
|
Public ReadOnly SelectItemOnRightClickProperty As DependencyProperty = DependencyProperty.RegisterAttached("SelectItemOnRightClick", GetType(Boolean), GetType(TreeViewItemHelper), New UIPropertyMetadata(False, AddressOf OnSelectItemOnRightClickChanged))
|
||||||
|
|
||||||
|
Public Function GetSelectItemOnRightClick(ByVal d As DependencyObject) As Boolean
|
||||||
|
Return CBool(d.GetValue(SelectItemOnRightClickProperty))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub SetSelectItemOnRightClick(ByVal d As DependencyObject, ByVal value As Boolean)
|
||||||
|
d.SetValue(SelectItemOnRightClickProperty, value)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnSelectItemOnRightClickChanged(ByVal d As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
|
||||||
|
Dim selectItemOnRightClick As Boolean = CBool(e.NewValue)
|
||||||
|
Dim treeView As TreeView = TryCast(d, TreeView)
|
||||||
|
|
||||||
|
If treeView IsNot Nothing Then
|
||||||
|
|
||||||
|
If selectItemOnRightClick Then
|
||||||
|
AddHandler treeView.PreviewMouseRightButtonDown, AddressOf OnPreviewMouseRightButtonDown
|
||||||
|
Else
|
||||||
|
RemoveHandler treeView.PreviewMouseRightButtonDown, AddressOf OnPreviewMouseRightButtonDown
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnPreviewMouseRightButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
|
||||||
|
Dim treeViewItem As TreeViewItem = VisualUpwardSearch(Of TreeViewItem)(TryCast(e.OriginalSource, DependencyObject))
|
||||||
|
If treeViewItem IsNot Nothing Then
|
||||||
|
treeViewItem.IsSelected = True
|
||||||
|
Dim Tree As TreeView = VisualUpwardSearch(Of TreeView)(TryCast(treeViewItem, DependencyObject))
|
||||||
|
If Not IsNothing(Tree) Then
|
||||||
|
Dim myTransform As GeneralTransform = treeViewItem.TransformToAncestor(Tree)
|
||||||
|
|
||||||
|
Dim myOffset As Point = myTransform.Transform(New Point(0, 0))
|
||||||
|
treeViewItem.ContextMenu.HorizontalOffset = -treeViewItem.ActualWidth + (-myOffset.X) + Tree.ActualWidth - 3
|
||||||
|
treeViewItem.ContextMenu.VerticalOffset = -3
|
||||||
|
End If
|
||||||
|
e.Handled = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function VisualUpwardSearch(Of T As DependencyObject)(ByVal source As DependencyObject) As T
|
||||||
|
Dim returnVal As DependencyObject = source
|
||||||
|
|
||||||
|
While returnVal IsNot Nothing AndAlso Not (TypeOf returnVal Is T)
|
||||||
|
Dim tempReturnVal As DependencyObject = Nothing
|
||||||
|
|
||||||
|
If TypeOf returnVal Is Visual OrElse TypeOf returnVal Is Visual3D Then
|
||||||
|
tempReturnVal = VisualTreeHelper.GetParent(returnVal)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If tempReturnVal Is Nothing Then
|
||||||
|
returnVal = LogicalTreeHelper.GetParent(returnVal)
|
||||||
|
Else
|
||||||
|
returnVal = tempReturnVal
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
|
||||||
|
Return TryCast(returnVal, T)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' Gestione indentazione sottoelementi
|
||||||
|
Public Function GetDepth(item As TreeViewItem) As Integer
|
||||||
|
Dim parent As TreeViewItem = GetParent(item)
|
||||||
|
|
||||||
|
If Not IsNothing(parent) Then Return GetDepth(parent) + 1
|
||||||
|
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetParent(item As TreeViewItem) As TreeViewItem
|
||||||
|
Dim parent As DependencyObject = If(Not IsNothing(item), VisualTreeHelper.GetParent(item), Nothing)
|
||||||
|
|
||||||
|
While Not IsNothing(parent) AndAlso Not (TypeOf parent Is TreeViewItem OrElse TypeOf parent Is TreeView)
|
||||||
|
parent = VisualTreeHelper.GetParent(parent)
|
||||||
|
End While
|
||||||
|
|
||||||
|
Return TryCast(parent, TreeViewItem)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetTreeParent(item As TreeViewItem) As TreeViewItem
|
||||||
|
Dim parent As DependencyObject = If(Not IsNothing(item), VisualTreeHelper.GetParent(item), Nothing)
|
||||||
|
|
||||||
|
While Not IsNothing(parent) AndAlso Not (TypeOf parent Is TreeViewItem OrElse TypeOf parent Is TreeView)
|
||||||
|
parent = VisualTreeHelper.GetParent(parent)
|
||||||
|
End While
|
||||||
|
|
||||||
|
Return TryCast(parent, TreeViewItem)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' Gestione indentazione sottoelementi
|
||||||
|
Public Function GetHeight(Item As TreeViewItem, SearchedItem As TreeViewItem, ByRef nHeight As Integer) As Boolean
|
||||||
|
Dim Index As Integer = 0
|
||||||
|
While Index <= Item.Items.Count - 1
|
||||||
|
If GetHeight(Item.Items(Index), SearchedItem, nHeight) Then
|
||||||
|
nHeight += 1
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Index += 1
|
||||||
|
End While
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Module
|
||||||
|
|
||||||
|
Public Class LeftMarginMultiplierConverter
|
||||||
|
Implements IValueConverter
|
||||||
|
|
||||||
|
Public Property Length As Double
|
||||||
|
|
||||||
|
Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||||
|
Dim item As TreeViewItem = TryCast(value, TreeViewItem)
|
||||||
|
If item Is Nothing Then Return New Thickness(0)
|
||||||
|
Return New Thickness(Length * GetDepth(item), 0, 0, 0)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||||
|
Throw New System.NotImplementedException()
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
@@ -1,71 +1,50 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="ChooseMachineWndV"
|
<EgtWPFLib5:EgtMainWindow x:Class="ChooseMachineWndV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
xmlns:Icarus="clr-namespace:Icarus"
|
xmlns:Icarus="clr-namespace:Icarus"
|
||||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
Title="New Project"
|
||||||
WindowStyle="None" ResizeMode="NoResize"
|
SizeToContent="WidthAndHeight"
|
||||||
SizeToContent="WidthAndHeight"
|
WindowStartupLocation="CenterOwner"
|
||||||
MinWidth="500"
|
Style="{StaticResource Dialog_Window}">
|
||||||
WindowStartupLocation="CenterOwner"
|
<Grid Margin="2.5,2.5,2.5,0">
|
||||||
IsClosable="False"
|
<Grid.RowDefinitions>
|
||||||
IsMinimizable="False"
|
<RowDefinition Height="Auto"/>
|
||||||
IsResizable="False"
|
<RowDefinition Height="Auto"/>
|
||||||
Title="ProjectType">
|
<RowDefinition Height="Auto"/>
|
||||||
<StackPanel Margin="5,5,5,0">
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.Row="1"
|
|
||||||
BorderThickness="1"
|
|
||||||
BorderBrush="DarkGray"
|
|
||||||
Background="White"
|
|
||||||
Margin="5">
|
|
||||||
<Grid Margin="5">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<Grid HorizontalAlignment="Center"
|
<TextBlock Text="{Binding ChooseMachine_Msg}"
|
||||||
Grid.Row="0"
|
Margin="20,20,20,2.5"
|
||||||
Margin="15">
|
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||||
<Grid.RowDefinitions>
|
<ComboBox Grid.Row="1"
|
||||||
<RowDefinition Height="Auto"/>
|
ItemsSource="{Binding MachineList}"
|
||||||
<RowDefinition Height="1*"/>
|
SelectedItem="{Binding SelMachine}"
|
||||||
<RowDefinition Height="Auto"/>
|
DisplayMemberPath="Name"
|
||||||
</Grid.RowDefinitions>
|
SelectedValuePath="Name"
|
||||||
<Grid.ColumnDefinitions>
|
Width="160"
|
||||||
<ColumnDefinition Width="Auto"/>
|
HorizontalAlignment="Center"
|
||||||
</Grid.ColumnDefinitions>
|
HorizontalContentAlignment="Center"
|
||||||
<TextBlock Text="{Binding ChooseMachine_Msg}"
|
Margin="2.5,10,2.5,2.5"
|
||||||
Style="{StaticResource OptionTextBlock}"
|
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||||
Grid.Row="0" Grid.ColumnSpan="2"/>
|
|
||||||
<Rectangle Height="22" Grid.Row="1"/>
|
|
||||||
<ComboBox ItemsSource="{Binding MachineList}" DisplayMemberPath="Name"
|
|
||||||
SelectedItem="{Binding SelMachine}" SelectedValuePath="Name"
|
|
||||||
Grid.Row="2"
|
|
||||||
Style="{StaticResource BtlData_ComboBox}"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Grid Grid.Row="2" Margin="5">
|
<UniformGrid Grid.Row="2"
|
||||||
<Grid.ColumnDefinitions>
|
Rows="1"
|
||||||
<ColumnDefinition Width="1*"/>
|
Margin="0,20,0,0">
|
||||||
<ColumnDefinition Width="Auto"/>
|
<Button Command="{Binding Ok_Command}"
|
||||||
<ColumnDefinition Width="1*"/>
|
IsDefault="True"
|
||||||
<ColumnDefinition Width="Auto"/>
|
Margin="0,0,2.5,0"
|
||||||
<ColumnDefinition Width="1*"/>
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
</Grid.ColumnDefinitions>
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
<Button Content="Ok"
|
Style="{StaticResource Button_Image}"/>
|
||||||
Command="{Binding Ok_Command}"
|
</Button>
|
||||||
IsDefault="True"
|
<Button IsCancel="True"
|
||||||
Grid.Column="1"
|
Margin="0,0,2.5,0"
|
||||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
<Button Content="Cancel"
|
<Image Source="\Resources\Common\Cancel.png"
|
||||||
IsCancel="True"
|
Style="{StaticResource Button_Image}"/>
|
||||||
Grid.Column="3"
|
</Button>
|
||||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
</UniformGrid>
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
</StackPanel>
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ Public Class ChooseMachineWndVM
|
|||||||
|
|
||||||
Public ReadOnly Property ChooseMachine_Msg As String
|
Public ReadOnly Property ChooseMachine_Msg As String
|
||||||
Get
|
Get
|
||||||
Return "Macchina: "
|
Return "Select the new project machine from the list"
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
Public Const TABLE = "Table"
|
Public Const TABLE = "Table"
|
||||||
Public Const TABLE_OUTLINE = "TableOutline"
|
Public Const TABLE_OUTLINE = "TableOutline"
|
||||||
|
Public Const EXTRUSION_AREA = "ExtrusionArea"
|
||||||
|
Public Const EXTRUSION_RECT = "ExtrusionRect"
|
||||||
Public Const PART = "Part"
|
Public Const PART = "Part"
|
||||||
Public Const ORIGINAL_SOLID = "OriginalSolid"
|
|
||||||
Public Const PRINT_SOLID = "PrintSolid"
|
Public Const PRINT_SOLID = "PrintSolid"
|
||||||
Public Const LAY_MACH_START = "MachStart"
|
Public Const LAY_MACH_START = "MachStart"
|
||||||
|
Public Const LAY_PARTREFERENCE = "PartFrame"
|
||||||
Public Const LAY_REFERENCE = "Frame"
|
Public Const LAY_REFERENCE = "Frame"
|
||||||
Public Const LAY_OTHERS = "Aux"
|
Public Const LAY_OTHERS = "Aux"
|
||||||
Public Const LAY_RIBS = "Ribs"
|
Public Const LAY_RIBS = "Ribs"
|
||||||
@@ -15,11 +17,15 @@
|
|||||||
Public Const START_GEOM = "Start"
|
Public Const START_GEOM = "Start"
|
||||||
Public Const RIB_EXTRUSION = "RibExtrusion"
|
Public Const RIB_EXTRUSION = "RibExtrusion"
|
||||||
Public Const RIB_CURVE = "RibCurve"
|
Public Const RIB_CURVE = "RibCurve"
|
||||||
|
Public Const RIB_ID = "RibId"
|
||||||
|
Public Const SHELLNUMBER_ID = "ShellNumberId"
|
||||||
|
Public Const FILLEDSOLID_ID = "FilledSolidId"
|
||||||
Public Const VIEWPARAMS = "ViewParams"
|
Public Const VIEWPARAMS = "ViewParams"
|
||||||
Public Const IMPORTED_SOLID = "ImportedSolid"
|
Public Const IMPORTED_SOLID = "ImportedSolid"
|
||||||
Public Const RESULT_READ_PROG = "ResultReadProg"
|
Public Const RESULT_READ_PROG = "ResultReadProg"
|
||||||
Public Const KEY_CALC_SOLIDS = "CalcSolids"
|
Public Const KEY_CALC_SOLIDS = "CalcSolids"
|
||||||
Public Const KEY_HAS_SOLIDS = "Solids"
|
Public Const KEY_HAS_SOLIDS = "Solids"
|
||||||
|
Public Const LAY_CHUNKS = "Chunks"
|
||||||
|
|
||||||
|
|
||||||
' parametri calcolo tempi, F ed S
|
' parametri calcolo tempi, F ed S
|
||||||
@@ -37,6 +43,7 @@
|
|||||||
Public Const KEY_SPEED = "Speed"
|
Public Const KEY_SPEED = "Speed"
|
||||||
Public Const KEY_SLICEID = "SliceId"
|
Public Const KEY_SLICEID = "SliceId"
|
||||||
Public Const KEY_MASS = "PrintMass"
|
Public Const KEY_MASS = "PrintMass"
|
||||||
|
Public Const KEY_EMITWAITINGTIME = "EmitWaitingTime"
|
||||||
|
|
||||||
|
|
||||||
' parametri Materiali
|
' parametri Materiali
|
||||||
@@ -47,7 +54,8 @@
|
|||||||
Public Const MAT_T3 = "T3"
|
Public Const MAT_T3 = "T3"
|
||||||
Public Const MAT_T4 = "T4"
|
Public Const MAT_T4 = "T4"
|
||||||
Public Const MAT_T5 = "T5"
|
Public Const MAT_T5 = "T5"
|
||||||
Public Const MAT_K = "K"
|
Public Const MAT_KEXTRUSION = "KExtrusion"
|
||||||
|
Public Const MAT_KLAYERTIME = "KLayerTime"
|
||||||
Public Const MAT_C1 = "C1"
|
Public Const MAT_C1 = "C1"
|
||||||
Public Const MAT_C2 = "C2"
|
Public Const MAT_C2 = "C2"
|
||||||
Public Const MAT_DENSITY = "Density"
|
Public Const MAT_DENSITY = "Density"
|
||||||
@@ -90,18 +98,25 @@
|
|||||||
Public Const MAC_LEADOUTTANGDIST = "LeadOutTangDist"
|
Public Const MAC_LEADOUTTANGDIST = "LeadOutTangDist"
|
||||||
Public Const MAC_LEADOUTORTHODIST = "LeadOutOrthoDist"
|
Public Const MAC_LEADOUTORTHODIST = "LeadOutOrthoDist"
|
||||||
Public Const MAC_COASTINGLEN = "CoastingLen"
|
Public Const MAC_COASTINGLEN = "CoastingLen"
|
||||||
Public Const MAC_COASTINGFEED = "CoastingFeed"
|
Public Const MAC_COASTINGFEEDPU = "CoastingFeedPu"
|
||||||
Public Const MAC_WIPELEN = "WipeLen"
|
Public Const MAC_WIPELEN = "WipeLen"
|
||||||
Public Const MAC_WIPEFEEDPU = "WipeFeedPu"
|
Public Const MAC_WIPEFEEDPU = "WipeFeedPu"
|
||||||
Public Const MAC_WIPEDIR = "WipeDir"
|
Public Const MAC_WIPEDIR = "WipeDir"
|
||||||
Public Const MAC_FLOORCOUNT = "FloorCount"
|
Public Const MAC_FLOORCOUNT = "FloorCount"
|
||||||
Public Const MAC_G0FEED = "G0Feed"
|
Public Const MAC_G0FEED = "G0Feed"
|
||||||
|
Public Const MAC_G0FEEDZ = "G0FeedZ"
|
||||||
Public Const MAC_TOOLDIAM = "ToolDiam"
|
Public Const MAC_TOOLDIAM = "ToolDiam"
|
||||||
|
Public Const MAC_PREFLOWDELAY = "PreFlowDelay"
|
||||||
|
Public Const MAC_POSTFLOWDELAY = "PostFlowDelay"
|
||||||
|
Public Const MAC_SCREWBACK = "ScrewBack"
|
||||||
|
Public Const MAC_SLICINGHEIGHT = "SlicingHeight"
|
||||||
|
Public Const MAC_RIBSTYPE = "RibsType"
|
||||||
Public Const MAC_RIBSOVERLAP = "RibsOverlap"
|
Public Const MAC_RIBSOVERLAP = "RibsOverlap"
|
||||||
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
|
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
|
||||||
Public Const MAC_RIBSLINK = "RibsLink"
|
Public Const MAC_RIBSLINK = "RibsLink"
|
||||||
Public Const MAC_RIBSINVERTORDER = "RibsInvertOrder"
|
Public Const MAC_RIBSINVERTORDER = "RibsInvertOrder"
|
||||||
Public Const MAC_RIBSINVERTDIRECTION = "RibsInvertDirection"
|
Public Const MAC_RIBSINVERTDIRECTION = "RibsInvertDirection"
|
||||||
|
Public Const MAC_RIBSINVERTSTRANDORDER = "RibsInvertStrandOrder"
|
||||||
Public Const MAC_RIBSLEADININVERT = "RibsLeadInInvert"
|
Public Const MAC_RIBSLEADININVERT = "RibsLeadInInvert"
|
||||||
Public Const MAC_RIBSLEADINLEN = "RibsLeadInLen"
|
Public Const MAC_RIBSLEADINLEN = "RibsLeadInLen"
|
||||||
Public Const MAC_RIBSLEADOUTINVERT = "RibsLeadOutInvert"
|
Public Const MAC_RIBSLEADOUTINVERT = "RibsLeadOutInvert"
|
||||||
@@ -109,19 +124,44 @@
|
|||||||
Public Const MAC_RIBSLEADOUTCOASTING = "RibsLeadOutCoasting"
|
Public Const MAC_RIBSLEADOUTCOASTING = "RibsLeadOutCoasting"
|
||||||
Public Const MAC_RIBSLEADOUTWIPE = "RibsLeadOutWipe"
|
Public Const MAC_RIBSLEADOUTWIPE = "RibsLeadOutWipe"
|
||||||
Public Const MAC_RIBSLEADOUTWIPEDIR = "RibsLeadOutWipeDir"
|
Public Const MAC_RIBSLEADOUTWIPEDIR = "RibsLeadOutWipeDir"
|
||||||
|
Public Const MAC_RIBSLIMITUNBOUNDEDWITHSOLID = "LimitUnboundedRibsWithSolid"
|
||||||
Public Const MAC_SHELLNBRDIFFERENCE = "ShellNbrDifference"
|
Public Const MAC_SHELLNBRDIFFERENCE = "ShellNbrDifference"
|
||||||
Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting"
|
Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting"
|
||||||
Public Const MAC_SHELLNBRWIPE = "ShellNbrWipe"
|
Public Const MAC_SHELLNBRWIPE = "ShellNbrWipe"
|
||||||
Public Const MAC_SHELLNBRWIPEDIR = "ShellNbrWipeDir"
|
Public Const MAC_SHELLNBRWIPEDIR = "ShellNbrWipeDir"
|
||||||
Public Const MAC_AUXSOLIDSOVERLAP = "AuxSolidsOverlap"
|
Public Const MAC_AUXSOLIDSOVERLAP = "AuxSolidsOverlap"
|
||||||
Public Const MAC_AUXSOLIDSINFILL = "AuxSolidsInfill"
|
Public Const MAC_AUXSOLIDSINFILL = "AuxSolidsInfill"
|
||||||
|
Public Const MAC_AUXSOLIDSINFILLLINK = "AuxSolidsInfillLink"
|
||||||
|
Public Const MAC_AUXSOLIDSSTRANDCOUNT = "AuxSolidsStrandCount"
|
||||||
Public Const MAC_AUXSOLIDSSTRANDORDER = "AuxSolidsStrandOrder"
|
Public Const MAC_AUXSOLIDSSTRANDORDER = "AuxSolidsStrandOrder"
|
||||||
Public Const MAC_AUXSOLIDSLINKTYPE = "AuxSolidsLinkType"
|
Public Const MAC_AUXSOLIDSLINKTYPE = "AuxSolidsLinkType"
|
||||||
Public Const MAC_AUXSOLIDSLINKPARAM = "AuxSolidsLinkParam"
|
Public Const MAC_AUXSOLIDSLINKPARAM = "AuxSolidsLinkParam"
|
||||||
Public Const MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE = "AuxSolidsStartPointOffsetOnSlice"
|
Public Const MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE = "AuxSolidsStartPointOffsetOnSlice"
|
||||||
|
Public Const MAC_AUXSOLIDSOFFSETLEADPOINT = "AuxSolidsOffsetLeadPoint"
|
||||||
|
Public Const MAC_AUXSOLIDSDENSITY = "AuxSolidsDensity"
|
||||||
|
Public Const MAC_AUXSOLIDSGRIDOVERLAP = "AuxSolidsGridOverlap"
|
||||||
|
Public Const MAC_AUXSOLIDSDIRECTION = "AuxSolidsDirection"
|
||||||
|
Public Const MAC_AUXSOLIDSOFFSETX = "AuxSolidsOffsetX"
|
||||||
|
Public Const MAC_AUXSOLIDSOFFSETY = "AuxSolidsOffsetY"
|
||||||
Public Const MAC_AUXSOLIDSCOASTINGLEN = "AuxSolidsCoastingLen"
|
Public Const MAC_AUXSOLIDSCOASTINGLEN = "AuxSolidsCoastingLen"
|
||||||
Public Const MAC_AUXSOLIDSWIPELEN = "AuxSolidsWipeLen"
|
Public Const MAC_AUXSOLIDSWIPELEN = "AuxSolidsWipeLen"
|
||||||
Public Const MAC_AUXSOLIDSWIPEDIR = "AuxSolidsWipeDir"
|
Public Const MAC_AUXSOLIDSWIPEDIR = "AuxSolidsWipeDir"
|
||||||
|
Public Const MAC_FLOORTYPE = "FloorType"
|
||||||
|
Public Const MAC_CEILCOUNT = "CeilCount"
|
||||||
|
Public Const MAC_CEILTYPE = "CeilType"
|
||||||
|
Public Const MAC_INFILLTYPE = "InfillType"
|
||||||
|
Public Const MAC_INFILLLINK = "InfillLink"
|
||||||
|
Public Const MAC_INFILLDENSITY = "InfillDensity"
|
||||||
|
Public Const MAC_INFILLOVERLAP = "InfillOverlap"
|
||||||
|
Public Const MAC_INFILLGRIDOVERLAP = "InfillGridOverlap"
|
||||||
|
Public Const MAC_INFILLDIRECTION = "InfillDirection"
|
||||||
|
Public Const MAC_INFILLOFFSETX = "InfillOffsetX"
|
||||||
|
Public Const MAC_INFILLOFFSETY = "InfillOffsetY"
|
||||||
|
Public Const MAC_INFILLCOASTING = "InfillCoasting"
|
||||||
|
Public Const MAC_INFILLWIPE = "InfillWipe"
|
||||||
|
Public Const MAC_INFILLWIPEDIR = "InfillWipeDir"
|
||||||
|
Public Const MAC_DYNAMICMODE = "DynamicMode"
|
||||||
|
Public Const MAC_PRINTORDER = "PrintOrder"
|
||||||
Public Const MAC_CONSTANT = "Constant"
|
Public Const MAC_CONSTANT = "Constant"
|
||||||
Public Const MAC_MATERIALS = "Materials"
|
Public Const MAC_MATERIALS = "Materials"
|
||||||
|
|
||||||
@@ -146,9 +186,19 @@
|
|||||||
' materiale in progetto
|
' materiale in progetto
|
||||||
Public Const KEY_MATERIAL_GUID = "MaterialGuid"
|
Public Const KEY_MATERIAL_GUID = "MaterialGuid"
|
||||||
Public Const KEY_MATERIAL_NAME = "MaterialName"
|
Public Const KEY_MATERIAL_NAME = "MaterialName"
|
||||||
|
|
||||||
' nome file cn in progetto
|
' nome file cn in progetto
|
||||||
Public Const KEY_ISOFILE_PATH = "IsoFilePath"
|
Public Const KEY_ISOFILE_PATH = "IsoFilePath"
|
||||||
|
|
||||||
|
' info di spostamento pezzo per 45 gradi
|
||||||
|
Public Const KEY_MOVEDPART = "MovedPart"
|
||||||
|
Public Const KEY_MOVEDPART2 = "MovedPart2"
|
||||||
|
|
||||||
Public Const FILE_PATH = "FilePath"
|
Public Const FILE_PATH = "FilePath"
|
||||||
|
Public Const PART_NAME = "PartName"
|
||||||
|
Public Const ENTITY_NAME = "EntityName"
|
||||||
|
|
||||||
|
' stringa che identifica il materiale come originale del costruttore
|
||||||
|
Public Const ORIG_MATERIAL As String = "***"
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ Public Module ConstGen
|
|||||||
' File con dati di licenza
|
' File con dati di licenza
|
||||||
Public Const LIC_FILE_NAME As String = "Icarus.lic"
|
Public Const LIC_FILE_NAME As String = "Icarus.lic"
|
||||||
Public Const S_LICENCE As String = "Licence"
|
Public Const S_LICENCE As String = "Licence"
|
||||||
|
Public Const K_LOCKID As String = "LockId"
|
||||||
Public Const K_KEY As String = "Key"
|
Public Const K_KEY As String = "Key"
|
||||||
Public Const K_NESTKEY As String = "NestKey"
|
Public Const K_NESTKEY As String = "NestKey"
|
||||||
|
|
||||||
@@ -51,17 +52,8 @@ Public Module ConstGen
|
|||||||
|
|
||||||
' Abilitazioni licenza
|
' Abilitazioni licenza
|
||||||
Friend Enum KEY_OPT As UInteger
|
Friend Enum KEY_OPT As UInteger
|
||||||
BASE = 1 ' Prodotto EgtCAM5
|
BASE = 1 ' Prodotto Icarus
|
||||||
DOORS = 2
|
MACHINE_EXPORT = 2 ' opzione per esportare file icrx per macchina
|
||||||
GUNSTOCK = 4
|
|
||||||
DOORCREATOR = 8 ' Prodotto DOORCreator
|
|
||||||
VIRTUALMILLING = 16
|
|
||||||
JAMBS = 32
|
|
||||||
BEAM = 64
|
|
||||||
CAD2D = 128
|
|
||||||
STEELDORS = 256
|
|
||||||
WALL = 512
|
|
||||||
_3DPRINT = 1024
|
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
' File di log generale
|
' File di log generale
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ Public Module ConstIni
|
|||||||
'Public Const K_MESSAGES As String = "Messages"
|
'Public Const K_MESSAGES As String = "Messages"
|
||||||
'Public Const K_WINPLACE As String = "WinPlace"
|
'Public Const K_WINPLACE As String = "WinPlace"
|
||||||
'Public Const K_LASTPROJ As String = "LastProj"
|
'Public Const K_LASTPROJ As String = "LastProj"
|
||||||
|
Public Const K_NETKEY As String = "NetKey"
|
||||||
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
||||||
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||||
'Public Const K_SUPPORT As String = "Support"
|
'Public Const K_SUPPORT As String = "Support"
|
||||||
@@ -42,6 +43,7 @@ Public Module ConstIni
|
|||||||
Public Const K_MOD_AUXSOLIDS As String = "ModAuxSolids"
|
Public Const K_MOD_AUXSOLIDS As String = "ModAuxSolids"
|
||||||
Public Const K_MOD_SOLIDSLICE As String = "ModSolidSlice"
|
Public Const K_MOD_SOLIDSLICE As String = "ModSolidSlice"
|
||||||
Public Const K_MOD_SLICETOOLPATH As String = "ModSliceToolPath"
|
Public Const K_MOD_SLICETOOLPATH As String = "ModSliceToolPath"
|
||||||
|
Public Const K_MOD_OTHERS As String = "ModOthers"
|
||||||
Public Const K_SLC_PRINTSOLID As String = "SlcPrintSolid"
|
Public Const K_SLC_PRINTSOLID As String = "SlcPrintSolid"
|
||||||
Public Const K_SLC_REFERENCE As String = "SlcReference"
|
Public Const K_SLC_REFERENCE As String = "SlcReference"
|
||||||
Public Const K_SLC_STARTMACHINING As String = "SlcStartMAchining"
|
Public Const K_SLC_STARTMACHINING As String = "SlcStartMAchining"
|
||||||
@@ -50,6 +52,7 @@ Public Module ConstIni
|
|||||||
Public Const K_SLC_AUXSOLIDS As String = "SlcAuxSolids"
|
Public Const K_SLC_AUXSOLIDS As String = "SlcAuxSolids"
|
||||||
Public Const K_SLC_SOLIDSLICE As String = "SlcSolidSlice"
|
Public Const K_SLC_SOLIDSLICE As String = "SlcSolidSlice"
|
||||||
Public Const K_SLC_SLICETOOLPATH As String = "SlcSliceToolPath"
|
Public Const K_SLC_SLICETOOLPATH As String = "SlcSliceToolPath"
|
||||||
|
Public Const K_SLC_OTHERS As String = "SlcOthers"
|
||||||
|
|
||||||
'Public Const S_LUA As String = "Lua"
|
'Public Const S_LUA As String = "Lua"
|
||||||
'Public Const K_LIBSDIR As String = "LibsDir"
|
'Public Const K_LIBSDIR As String = "LibsDir"
|
||||||
@@ -103,12 +106,22 @@ Public Module ConstIni
|
|||||||
'Public Const S_SIMUL As String = "Simul"
|
'Public Const S_SIMUL As String = "Simul"
|
||||||
'Public Const K_SLIDERX As String = "SliderX"
|
'Public Const K_SLIDERX As String = "SliderX"
|
||||||
'Public Const K_SLIDERVAL As String = "SliderVal"
|
'Public Const K_SLIDERVAL As String = "SliderVal"
|
||||||
|
Public Const K_MACHVIEWMODE As String = "MachViewMode"
|
||||||
|
|
||||||
Public Const S_PRINTING3D As String = "3dPrinting"
|
Public Const S_PRINTING3D As String = "3dPrinting"
|
||||||
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
||||||
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||||
Public Const K_CURRMACHINING As String = "CurrMachining"
|
Public Const K_CURRMACHINING As String = "CurrMachining"
|
||||||
Public Const K_VIEWSLIDER As String = "ViewSlider"
|
Public Const K_VIEWSLIDER As String = "ViewSlider"
|
||||||
|
Public Const K_IMPORTCURREXTENSION As String = "ImportCurrExtension"
|
||||||
|
|
||||||
|
Public Const S_COLORS As String = "Colors"
|
||||||
|
Public Const K_CLR_PRINTPART As String = "PrintPart"
|
||||||
|
Public Const K_CLR_RIBS As String = "Ribs"
|
||||||
|
Public Const K_CLR_SHELLNUMBERS As String = "ShellNumbers"
|
||||||
|
Public Const K_CLR_AUXSOLIDS As String = "AuxSolids"
|
||||||
|
Public Const K_CLR_MACHSTART As String = "MachStart"
|
||||||
|
Public Const K_CLR_OTHERS As String = "Others"
|
||||||
|
|
||||||
Public Const S_MRUFILES As String = "MruFiles"
|
Public Const S_MRUFILES As String = "MruFiles"
|
||||||
Public Const S_MRUIMPORTFILES As String = "MruImportFiles"
|
Public Const S_MRUIMPORTFILES As String = "MruImportFiles"
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' EgalTech 2015-2015
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' File : ConstIni.vb Data : 12.02.15 Versione : 1.6b3
|
||||||
|
' Contenuto : Modulo costanti sezione e chiavi per file Ini.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'
|
||||||
|
' Modifiche : 12.02.15 DS Creazione modulo.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Public Module ConstMachDataIni
|
||||||
|
|
||||||
|
Public Const MACHDATA_INI_FILE_NAME As String = "Data.ini"
|
||||||
|
|
||||||
|
Public Const S_TABLE As String = "Table"
|
||||||
|
Public Const K_DIMX As String = "DimX"
|
||||||
|
Public Const K_DIMY As String = "DimY"
|
||||||
|
Public Const K_POSX As String = "PosX"
|
||||||
|
Public Const K_POSY As String = "PosY"
|
||||||
|
Public Const K_POSZ As String = "PosZ"
|
||||||
|
|
||||||
|
Public Const S_VERTICAL As String = "Vertical"
|
||||||
|
Public Const S_45DEGX As String = "45DegX"
|
||||||
|
Public Const S_45DEGY As String = "45DegY"
|
||||||
|
Public Const S_HORIZONTAL As String = "Horizontal"
|
||||||
|
Public Const K_MINX As String = "MinX"
|
||||||
|
Public Const K_MAXX As String = "MaxX"
|
||||||
|
Public Const K_MINY As String = "MinY"
|
||||||
|
Public Const K_MAXY As String = "MaxY"
|
||||||
|
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -1,39 +1,17 @@
|
|||||||
Public Module ConstMachIni
|
Public Module ConstMachIni
|
||||||
|
|
||||||
Public Const MACH_INI_FILE_NAME As String = "MachData.ini"
|
Public Const MACH_INI_FILE_NAME As String = "MachData.ini"
|
||||||
Public Const GETWALLDATA_FILE_NAME As String = "GetWallData.lua"
|
|
||||||
Public Const GETTS3DATA_FILE_NAME As String = "GetTs3Data.lua"
|
|
||||||
|
|
||||||
Public Const K_NCTYPE As String = "NCType"
|
|
||||||
Public Const K_CONNECTIONSTRING As String = "ConnectionString"
|
|
||||||
|
|
||||||
Public Const S_CHANNELS As String = "Channels"
|
|
||||||
|
|
||||||
Public Const S_PARTPROGRAM As String = "PartProgram"
|
|
||||||
Public Const S_EXTENSION As String = "Extension"
|
|
||||||
|
|
||||||
' Variables della macchina corrente
|
|
||||||
Public Const S_MAINVARIABLES As String = "MainVariables"
|
|
||||||
Public Const S_VARIABLES As String = "Variables"
|
|
||||||
Public Const S_INPUTVARIABLES As String = "InputVariables"
|
|
||||||
Public Const S_OUTPUTVARIABLES As String = "OutputVariables"
|
|
||||||
Public Const S_MDI As String = "MDI"
|
|
||||||
|
|
||||||
Public Const K_BEAM As String = "Beam"
|
|
||||||
Public Const K_WALL As String = "Wall"
|
|
||||||
Public Const K_SCRIPT As String = "Scripts"
|
|
||||||
Public Const K_SETUP As String = "Setup"
|
|
||||||
Public Const K_FLOW As String = "Flow"
|
|
||||||
|
|
||||||
Public Const TS3DATA_FILE As String = "Ts3Data.lua"
|
|
||||||
|
|
||||||
Public Const S_MACHINING As String = "Machining"
|
Public Const S_MACHINING As String = "Machining"
|
||||||
Public Const K_MACH_INITSCRIPT As String = "InitScript"
|
Public Const K_MACH_INITSCRIPT As String = "InitScript"
|
||||||
Public Const K_MACH_EXITSCRIPT As String = "ExitScript"
|
Public Const K_MACH_EXITSCRIPT As String = "ExitScript"
|
||||||
|
|
||||||
Public Const S_MACH_PRINTING3D As String = "3dPrinting"
|
Public Const S_MACH_PRINTING3D As String = "3dPrinting"
|
||||||
Public Const K_HORIZONTAL_PRINT As String = "HorizontalPrint"
|
Public Const K_SLICINGTYPE As String = "SlicingType"
|
||||||
Public Const K_SPEED_MIN As String = "SpeedMin"
|
Public Const K_SPEED_MIN As String = "SpeedMin"
|
||||||
Public Const K_SPEED_MAX As String = "SpeedMax"
|
Public Const K_SPEED_MAX As String = "SpeedMax"
|
||||||
|
Public Const K_MAX_HEIGHT As String = "HMax"
|
||||||
|
|
||||||
|
Public Const S_MINMAX As String = "MinMax"
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
<UserControl x:Class="ControllerInputPanelV"
|
<Border x:Class="ControllerInputPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
Height="32">
|
Height="38"
|
||||||
|
Visibility="{Binding Message_Visibility}"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Margin="45,0,0,0"
|
||||||
|
Padding="0"
|
||||||
|
Style="{StaticResource ViewLayerManager_Border}">
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal"
|
||||||
|
Margin="2.5">
|
||||||
<StackPanel.Style>
|
<StackPanel.Style>
|
||||||
<Style TargetType="{x:Type StackPanel}">
|
<Style TargetType="{x:Type StackPanel}">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
@@ -16,31 +22,46 @@
|
|||||||
</StackPanel.Style>
|
</StackPanel.Style>
|
||||||
<TextBlock Text="{Binding Message}"
|
<TextBlock Text="{Binding Message}"
|
||||||
Visibility="{Binding Message_Visibility}"
|
Visibility="{Binding Message_Visibility}"
|
||||||
Style="{StaticResource OptionTextBlock}"/>
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ControllerInput_TextBlock}"/>
|
||||||
<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
|
<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Width="200"
|
Width="150"
|
||||||
Visibility="{Binding Text_Visibility}" Margin="5,0,5,0"
|
Visibility="{Binding Text_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource ControllerInputPanel_TextBox}">
|
Style="{StaticResource ControllerInputPanel_TextBox}">
|
||||||
<TextBox.InputBindings>
|
<TextBox.InputBindings>
|
||||||
<KeyBinding Key="Enter" Command="{Binding Done_Command, UpdateSourceTrigger=PropertyChanged}"/>
|
<KeyBinding Key="Enter" Command="{Binding Done_Command, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
<KeyBinding Key="S" Modifiers="Control" Command="{Binding Show_Command}"/>
|
<KeyBinding Key="S" Modifiers="Control" Command="{Binding Show_Command}"/>
|
||||||
</TextBox.InputBindings>
|
</TextBox.InputBindings>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
|
<CheckBox Content="{Binding CheckBoxText}"
|
||||||
Visibility="{Binding Check_Visibility}" Margin="5,0,5,0"
|
IsChecked="{Binding IsChecked}"
|
||||||
|
Visibility="{Binding Check_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
|
<ComboBox ItemsSource="{Binding ComboItemsList}"
|
||||||
Visibility="{Binding Combo_Visibility}" Margin="5,0,5,0"/>
|
SelectedIndex="{Binding ComboSelectedIndex}"
|
||||||
<Grid Margin="5,0,5,0">
|
Visibility="{Binding Combo_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"/>
|
||||||
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Command="{Binding Show_Command}" Visibility="{Binding ShowBtn_Visibility}"
|
<Button Command="{Binding Show_Command}"
|
||||||
Content="{Binding ShowMsg}" Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
Visibility="{Binding ShowBtn_Visibility}"
|
||||||
<Button Command="{Binding Done_Command}" Visibility="{Binding DoneBtn_Visibility}"
|
Content="{Binding ShowMsg}"
|
||||||
Grid.Column="1"
|
Margin="2.5,0,2.5,0"
|
||||||
Content="{Binding OkMsg}" Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
Style="{StaticResource RightPanel_Button}"/>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Command="{Binding Done_Command}"
|
||||||
|
Visibility="{Binding DoneBtn_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_Button}">
|
||||||
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
|
||||||
|
</Border>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.Collections.Specialized
|
||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
@@ -110,6 +111,7 @@ Public Class CurrMachining
|
|||||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False))
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False))
|
||||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False))
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False))
|
||||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False))
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False))
|
||||||
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, False))
|
||||||
For Each Cathegory In m_CathegoryList
|
For Each Cathegory In m_CathegoryList
|
||||||
For Each MachiningParam In Cathegory.MachiningParamList
|
For Each MachiningParam In Cathegory.MachiningParamList
|
||||||
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
||||||
@@ -127,6 +129,7 @@ Public Class CurrMachining
|
|||||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True))
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True))
|
||||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True))
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True))
|
||||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True))
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True))
|
||||||
|
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, True))
|
||||||
For Each Cathegory In m_CathegoryList
|
For Each Cathegory In m_CathegoryList
|
||||||
For Each MachiningParam In Cathegory.MachiningParamList
|
For Each MachiningParam In Cathegory.MachiningParamList
|
||||||
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
||||||
@@ -150,7 +153,7 @@ Public Class CurrMachining
|
|||||||
|
|
||||||
Friend Overrides Sub OnMachiningParamPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
Friend Overrides Sub OnMachiningParamPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||||
Select Case e.PropertyName
|
Select Case e.PropertyName
|
||||||
Case NameOf(sender.dValue), NameOf(sender.sValue), NameOf(sender.bValue), NameOf(sender.SelValue)
|
Case NameOf(sender.dValue), NameOf(sender.sValue), NameOf(sender.bValue), NameOf(sender.SelValue), NameOf(sender.Value)
|
||||||
m_bIsModified = m_CathegoryList.Any(Function(x) x.MachiningParamList.Any(Function(y) y.bIsModified))
|
m_bIsModified = m_CathegoryList.Any(Function(x) x.MachiningParamList.Any(Function(y) y.bIsModified))
|
||||||
NotifyPropertyChanged(NameOf(ghName))
|
NotifyPropertyChanged(NameOf(ghName))
|
||||||
NotifyPropertyChanged(NameOf(sCurrSlicingType))
|
NotifyPropertyChanged(NameOf(sCurrSlicingType))
|
||||||
@@ -158,9 +161,25 @@ Public Class CurrMachining
|
|||||||
NotifyPropertyChanged(NameOf(sCurrStrandW))
|
NotifyPropertyChanged(NameOf(sCurrStrandW))
|
||||||
NotifyPropertyChanged(NameOf(sCurrStrandCount))
|
NotifyPropertyChanged(NameOf(sCurrStrandCount))
|
||||||
NotifyPropertyChanged(NameOf(sCurrOffset))
|
NotifyPropertyChanged(NameOf(sCurrOffset))
|
||||||
|
sender.NotifyPropertyChanged(NameOf(sender.bIsModifiedFromDb))
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub Save()
|
||||||
|
If bIsModified Then
|
||||||
|
' salvo tutti i parametri su orig
|
||||||
|
SaveParams()
|
||||||
|
' resetto stato di modificata
|
||||||
|
UpdateIsModified()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub SaveParams()
|
||||||
|
For Each Cathegory In m_CathegoryList
|
||||||
|
Cathegory.SaveParams()
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub WriteCurrParamInPart(nPartId As Integer)
|
Friend Sub WriteCurrParamInPart(nPartId As Integer)
|
||||||
EgtSetInfo(nPartId, MAC_GUID, m_sCurrGUID.ToString())
|
EgtSetInfo(nPartId, MAC_GUID, m_sCurrGUID.ToString())
|
||||||
For Each Cathegory As CurrMachiningCathegory In m_CathegoryList
|
For Each Cathegory As CurrMachiningCathegory In m_CathegoryList
|
||||||
@@ -182,75 +201,134 @@ Public Class CurrMachiningCathegory
|
|||||||
Select Case m_Type
|
Select Case m_Type
|
||||||
Case Cathegories.GENERAL
|
Case Cathegories.GENERAL
|
||||||
m_sName = "General"
|
m_sName = "General"
|
||||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.SLICINGTYPE, nPartId, nIndex, bForceFromDb),
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.SLICINGTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrCheckMachiningParam(MachiningParam.Params.SPIRALVASE, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.SPIRALVASE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.STRANDH, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.STRANDH, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.STRANDW, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.STRANDW, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.STRANDCOUNT, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.STRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.OFFSET, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.OFFSET, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.STRANDOVERLAP, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.STRANDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb),
|
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb),
|
New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.G0FEEDZ, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.TOOLDIAM, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.CONSTANT, nPartId, nIndex, bForceFromDb)})
|
New CurrNumericMachiningParam(MachiningParam.Params.TOOLDIAM, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.FLOWRATE_PC, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrComboMachiningParam(MachiningParam.Params.DYNAMIC_MODE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.SCREWBACK, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nPartId, nIndex, bForceFromDb, Me)})
|
||||||
Case Cathegories.LINK
|
Case Cathegories.LINK
|
||||||
m_sName = "Shell"
|
m_sName = "Shell"
|
||||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb),
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb),
|
New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb),
|
New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb, Me)})
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEEDPU, nPartId, nIndex, bForceFromDb),
|
'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb)})
|
|
||||||
Case Cathegories.RIBS
|
Case Cathegories.RIBS
|
||||||
m_sName = "Ribs"
|
m_sName = "Ribs"
|
||||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb),
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb)})
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
||||||
Case Cathegories.SHELL_NUMBER
|
Case Cathegories.SHELL_NUMBER
|
||||||
m_sName = "Reduce Shell Number"
|
m_sName = "Reduce Shell Number"
|
||||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb),
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb)})
|
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
||||||
Case Cathegories.AUX_SOLID
|
Case Cathegories.AUX_SOLID
|
||||||
m_sName = "Filled Solid"
|
m_sName = "Filled Solid"
|
||||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb),
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb),
|
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb),
|
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb)})
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
||||||
|
Case Cathegories.INFILL
|
||||||
|
m_sName = "Infill"
|
||||||
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrComboMachiningParam(MachiningParam.Params.FLOORTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.CEILCOUNT, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrComboMachiningParam(MachiningParam.Params.CEILTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrComboMachiningParam(MachiningParam.Params.INFILLTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrCheckMachiningParam(MachiningParam.Params.INFILLLINK, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLDENSITY, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLGRIDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLDIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOFFSETX, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOFFSETY, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLCOASTING, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLWIPE, nPartId, nIndex, bForceFromDb, Me),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.INFILLWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
||||||
|
End Select
|
||||||
|
' verifico dipendenze tra parametri
|
||||||
|
Select Case m_Type
|
||||||
|
Case Cathegories.LINK
|
||||||
|
For Each Param In {MachiningParam.Params.LINKTYPE, MachiningParam.Params.LEADIN, MachiningParam.Params.LEADOUT}
|
||||||
|
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||||
|
MachiningParam.ManageDependencyParam()
|
||||||
|
Next
|
||||||
|
Case Cathegories.RIBS
|
||||||
|
For Each Param In {MachiningParam.Params.RIBSTYPE}
|
||||||
|
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||||
|
MachiningParam.ManageDependencyParam()
|
||||||
|
Next
|
||||||
|
Case Cathegories.AUX_SOLID
|
||||||
|
For Each Param In {MachiningParam.Params.AUXSOLIDSINFILL}
|
||||||
|
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||||
|
MachiningParam.ManageDependencyParam()
|
||||||
|
Next
|
||||||
|
For Each Param In {MachiningParam.Params.AUXSOLIDSSTRANDCOUNT}
|
||||||
|
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||||
|
MachiningParam.ManageDependencyParam()
|
||||||
|
Next
|
||||||
|
Case Cathegories.INFILL
|
||||||
|
For Each Param In {MachiningParam.Params.FLOORCOUNT, MachiningParam.Params.CEILCOUNT}
|
||||||
|
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||||
|
MachiningParam.ManageDependencyParam()
|
||||||
|
Next
|
||||||
|
For Each Param In {MachiningParam.Params.INFILLTYPE}
|
||||||
|
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||||
|
MachiningParam.ManageDependencyParam()
|
||||||
|
Next
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub SaveCurrParams()
|
|
||||||
For Each Param In m_MachiningParamList
|
|
||||||
Param.SaveParam()
|
|
||||||
Next
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub ResetCurrParams()
|
Friend Sub ResetCurrParams()
|
||||||
@@ -272,16 +350,25 @@ Public Class CurrNumericMachiningParam
|
|||||||
|
|
||||||
Public Overrides Property sValue As String
|
Public Overrides Property sValue As String
|
||||||
Get
|
Get
|
||||||
Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
|
Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString(m_dValue, 2))
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
|
Dim dTempValue As Double = 0
|
||||||
If m_bIsLen Then
|
If m_bIsLen Then
|
||||||
StringToLen(value, m_dValue)
|
StringToLen(value, dTempValue)
|
||||||
Else
|
Else
|
||||||
m_dValue = value
|
StringToDouble(value, dTempValue)
|
||||||
|
End If
|
||||||
|
If m_bIsActiveMinMax Then
|
||||||
|
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
|
||||||
|
m_dValue = dTempValue
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
m_dValue = dTempValue
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged(NameOf(sValue))
|
NotifyPropertyChanged(NameOf(sValue))
|
||||||
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
||||||
|
ManageDependencyParam()
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -301,8 +388,8 @@ Public Class CurrNumericMachiningParam
|
|||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdResetParam As ICommand
|
Private m_cmdResetParam As ICommand
|
||||||
|
|
||||||
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
|
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
|
||||||
MyBase.New(Type, nIndex)
|
MyBase.New(Type, nIndex, Cathegory)
|
||||||
Dim bReadFromPart As Boolean = False
|
Dim bReadFromPart As Boolean = False
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.STRANDH
|
Case Params.STRANDH
|
||||||
@@ -313,13 +400,13 @@ Public Class CurrNumericMachiningParam
|
|||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.STRANDCOUNT
|
Case Params.STRANDCOUNT
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_STRANDCOUNT, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_STRANDCOUNT, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.OFFSET
|
Case Params.OFFSET
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_OFFSET, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_OFFSET, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.STRANDOVERLAP
|
Case Params.STRANDOVERLAP
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_STRANDOVERLAP, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_STRANDOVERLAP, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.STARTPOINTOFFSETONSLICE
|
Case Params.STARTPOINTOFFSETONSLICE
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_STARTPOINTOFFSETONSLICE, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_STARTPOINTOFFSETONSLICE, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
@@ -347,33 +434,48 @@ Public Class CurrNumericMachiningParam
|
|||||||
Case Params.COASTINGLEN
|
Case Params.COASTINGLEN
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_COASTINGLEN, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_COASTINGLEN, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.COASTINGFEED
|
Case Params.COASTINGFEED_PC
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_COASTINGFEED, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_COASTINGFEEDPU, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.WIPELEN
|
Case Params.WIPELEN
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPELEN, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPELEN, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.WIPEFEEDPU
|
Case Params.WIPEFEED_PC
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEFEEDPU, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEFEEDPU, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.WIPEDIR
|
'Case Params.WIPEDIR
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEDIR, m_dValue)
|
' bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEDIR, m_dValue)
|
||||||
m_bIsLen = True
|
' m_bIsLen = True
|
||||||
Case Params.FLOORCOUNT
|
Case Params.FLOORCOUNT
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_FLOORCOUNT, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_FLOORCOUNT, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.G0FEED
|
Case Params.G0FEED
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_G0FEED, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_G0FEED, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
|
Case Params.G0FEEDZ
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_G0FEEDZ, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
Case Params.TOOLDIAM
|
Case Params.TOOLDIAM
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_TOOLDIAM, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_TOOLDIAM, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
|
Case Params.PREFLOWDELAY
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_PREFLOWDELAY, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.POSTFLOWDELAY
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_POSTFLOWDELAY, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.SCREWBACK
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.SLICINGHEIGHT
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGHEIGHT, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
Case Params.RIBSOVERLAP
|
Case Params.RIBSOVERLAP
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.RIBSSTRANDCOUNT
|
Case Params.RIBSSTRANDCOUNT
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.RIBSLEADINLEN
|
Case Params.RIBSLEADINLEN
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADINLEN, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADINLEN, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
@@ -388,10 +490,10 @@ Public Class CurrNumericMachiningParam
|
|||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.RIBSLEADOUTWIPEDIR
|
Case Params.RIBSLEADOUTWIPEDIR
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.SHELLNBRDIFFERENCE
|
Case Params.SHELLNBRDIFFERENCE
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.SHELLNBRCOASTING
|
Case Params.SHELLNBRCOASTING
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRCOASTING, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRCOASTING, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
@@ -400,16 +502,37 @@ Public Class CurrNumericMachiningParam
|
|||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.SHELLNBRWIPEDIR
|
Case Params.SHELLNBRWIPEDIR
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRWIPEDIR, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRWIPEDIR, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.AUXSOLIDSOVERLAP
|
Case Params.AUXSOLIDSOVERLAP
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.AUXSOLIDSLINKPARAM
|
Case Params.AUXSOLIDSLINKPARAM
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSSTRANDCOUNT
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
|
||||||
|
m_bIsLen = False
|
||||||
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
|
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSOFFSETLEADPOINT
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSDENSITY
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSDENSITY, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSGRIDOVERLAP
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSDIRECTION
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSOFFSETX
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSOFFSETY
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
Case Params.AUXSOLIDSCOASTINGLEN
|
Case Params.AUXSOLIDSCOASTINGLEN
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
@@ -418,33 +541,76 @@ Public Class CurrNumericMachiningParam
|
|||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.AUXSOLIDSWIPEDIR
|
Case Params.AUXSOLIDSWIPEDIR
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.CONSTANT
|
Case Params.FLOWRATE_PC
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue)
|
||||||
m_bIsLen = False
|
m_bIsLen = False
|
||||||
|
Case Params.CEILCOUNT
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILCOUNT, m_dValue)
|
||||||
|
m_bIsLen = False
|
||||||
|
Case Params.INFILLDENSITY
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLDENSITY, m_dValue)
|
||||||
|
m_bIsLen = False
|
||||||
|
Case Params.INFILLOVERLAP
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOVERLAP, m_dValue)
|
||||||
|
m_bIsLen = False
|
||||||
|
Case Params.INFILLGRIDOVERLAP
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLGRIDOVERLAP, m_dValue)
|
||||||
|
m_bIsLen = False
|
||||||
|
Case Params.INFILLDIRECTION
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLDIRECTION, m_dValue)
|
||||||
|
m_bIsLen = False
|
||||||
|
Case Params.INFILLOFFSETX
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOFFSETX, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.INFILLOFFSETY
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOFFSETY, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.INFILLCOASTING
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLCOASTING, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.INFILLWIPE
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLWIPE, m_dValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.INFILLWIPEDIR
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLWIPEDIR, m_dValue)
|
||||||
|
m_bIsLen = False
|
||||||
End Select
|
End Select
|
||||||
m_dOrigValue = m_dValue
|
m_dOrigValue = m_dValue
|
||||||
If nIndex > 0 Then
|
If nIndex > 0 Then
|
||||||
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE, Params.FLOORCOUNT, Params.G0FEED, Params.TOOLDIAM, Params.CONSTANT
|
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
|
||||||
|
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.LINKPARAM, Params.LINKZUP, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
|
Case Params.LINKPARAM, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
|
||||||
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED, Params.WIPELEN, Params.WIPEFEEDPU, Params.WIPEDIR
|
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
|
||||||
|
Params.WIPELEN, Params.WIPEFEED_PC ' Params.WIPEDIR
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSLEADININVERT,
|
Case Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
|
||||||
Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING, Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR
|
Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING,
|
||||||
|
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR
|
Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR
|
Case Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
|
||||||
|
Params.AUXSOLIDSOFFSETLEADPOINT, Params.AUXSOLIDSDENSITY, Params.AUXSOLIDSGRIDOVERLAP,
|
||||||
|
Params.AUXSOLIDSDIRECTION, Params.AUXSOLIDSOFFSETX, Params.AUXSOLIDSOFFSETY,
|
||||||
|
Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR, Params.AUXSOLIDSSTRANDCOUNT
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
|
Case Params.FLOORCOUNT, Params.CEILCOUNT, Params.INFILLDENSITY, Params.INFILLOVERLAP,
|
||||||
|
Params.INFILLGRIDOVERLAP, Params.INFILLDIRECTION, Params.INFILLOFFSETX,
|
||||||
|
Params.INFILLOFFSETY, Params.INFILLCOASTING, Params.INFILLWIPE, Params.INFILLWIPEDIR
|
||||||
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
End Select
|
End Select
|
||||||
If bForceFromDb OrElse Not bReadFromPart Then
|
If bForceFromDb OrElse Not bReadFromPart Then
|
||||||
m_dValue = m_DbParam.dOrigValue
|
m_dValue = m_DbParam.dOrigValue
|
||||||
m_dOrigValue = m_DbParam.dOrigValue
|
m_dOrigValue = m_DbParam.dOrigValue
|
||||||
End If
|
End If
|
||||||
ElseIf Type = Params.CONSTANT AndAlso Not bReadFromPart Then
|
ElseIf Type = Params.G0FEEDZ AndAlso Not bReadFromPart Then
|
||||||
|
m_dValue = 1000
|
||||||
|
m_dOrigValue = 1000
|
||||||
|
ElseIf Type = Params.FLOWRATE_PC AndAlso Not bReadFromPart Then
|
||||||
m_dValue = 100
|
m_dValue = 100
|
||||||
m_dOrigValue = 100
|
m_dOrigValue = 100
|
||||||
End If
|
End If
|
||||||
@@ -486,20 +652,30 @@ Public Class CurrNumericMachiningParam
|
|||||||
EgtSetInfo(nPartId, MAC_LEADOUTORTHODIST, sWriteValue)
|
EgtSetInfo(nPartId, MAC_LEADOUTORTHODIST, sWriteValue)
|
||||||
Case Params.COASTINGLEN
|
Case Params.COASTINGLEN
|
||||||
EgtSetInfo(nPartId, MAC_COASTINGLEN, sWriteValue)
|
EgtSetInfo(nPartId, MAC_COASTINGLEN, sWriteValue)
|
||||||
Case Params.COASTINGFEED
|
Case Params.COASTINGFEED_PC
|
||||||
EgtSetInfo(nPartId, MAC_COASTINGFEED, sWriteValue)
|
EgtSetInfo(nPartId, MAC_COASTINGFEEDPU, sWriteValue)
|
||||||
Case Params.WIPELEN
|
Case Params.WIPELEN
|
||||||
EgtSetInfo(nPartId, MAC_WIPELEN, sWriteValue)
|
EgtSetInfo(nPartId, MAC_WIPELEN, sWriteValue)
|
||||||
Case Params.WIPEFEEDPU
|
Case Params.WIPEFEED_PC
|
||||||
EgtSetInfo(nPartId, MAC_WIPEFEEDPU, sWriteValue)
|
EgtSetInfo(nPartId, MAC_WIPEFEEDPU, sWriteValue)
|
||||||
Case Params.WIPEDIR
|
'Case Params.WIPEDIR
|
||||||
EgtSetInfo(nPartId, MAC_WIPEDIR, sWriteValue)
|
' EgtSetInfo(nPartId, MAC_WIPEDIR, sWriteValue)
|
||||||
Case Params.FLOORCOUNT
|
Case Params.FLOORCOUNT
|
||||||
EgtSetInfo(nPartId, MAC_FLOORCOUNT, sWriteValue)
|
EgtSetInfo(nPartId, MAC_FLOORCOUNT, sWriteValue)
|
||||||
Case Params.G0FEED
|
Case Params.G0FEED
|
||||||
EgtSetInfo(nPartId, MAC_G0FEED, sWriteValue)
|
EgtSetInfo(nPartId, MAC_G0FEED, sWriteValue)
|
||||||
|
Case Params.G0FEEDZ
|
||||||
|
EgtSetInfo(nPartId, MAC_G0FEEDZ, sWriteValue)
|
||||||
Case Params.TOOLDIAM
|
Case Params.TOOLDIAM
|
||||||
EgtSetInfo(nPartId, MAC_TOOLDIAM, sWriteValue)
|
EgtSetInfo(nPartId, MAC_TOOLDIAM, sWriteValue)
|
||||||
|
Case Params.PREFLOWDELAY
|
||||||
|
EgtSetInfo(nPartId, MAC_PREFLOWDELAY, sWriteValue)
|
||||||
|
Case Params.POSTFLOWDELAY
|
||||||
|
EgtSetInfo(nPartId, MAC_POSTFLOWDELAY, sWriteValue)
|
||||||
|
Case Params.SCREWBACK
|
||||||
|
EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue)
|
||||||
|
Case Params.SLICINGHEIGHT
|
||||||
|
EgtSetInfo(nPartId, MAC_SLICINGHEIGHT, sWriteValue)
|
||||||
Case Params.RIBSOVERLAP
|
Case Params.RIBSOVERLAP
|
||||||
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
|
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
|
||||||
Case Params.RIBSSTRANDCOUNT
|
Case Params.RIBSSTRANDCOUNT
|
||||||
@@ -522,20 +698,54 @@ Public Class CurrNumericMachiningParam
|
|||||||
EgtSetInfo(nPartId, MAC_SHELLNBRWIPE, sWriteValue)
|
EgtSetInfo(nPartId, MAC_SHELLNBRWIPE, sWriteValue)
|
||||||
Case Params.SHELLNBRWIPEDIR
|
Case Params.SHELLNBRWIPEDIR
|
||||||
EgtSetInfo(nPartId, MAC_SHELLNBRWIPEDIR, sWriteValue)
|
EgtSetInfo(nPartId, MAC_SHELLNBRWIPEDIR, sWriteValue)
|
||||||
|
Case Params.AUXSOLIDSSTRANDCOUNT
|
||||||
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
|
||||||
Case Params.AUXSOLIDSOVERLAP
|
Case Params.AUXSOLIDSOVERLAP
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
|
||||||
Case Params.AUXSOLIDSLINKPARAM
|
Case Params.AUXSOLIDSLINKPARAM
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, sWriteValue)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, sWriteValue)
|
||||||
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
|
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue)
|
||||||
|
Case Params.AUXSOLIDSOFFSETLEADPOINT
|
||||||
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue)
|
||||||
|
Case Params.AUXSOLIDSDENSITY
|
||||||
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSDENSITY, sWriteValue)
|
||||||
|
Case Params.AUXSOLIDSGRIDOVERLAP
|
||||||
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue)
|
||||||
|
Case Params.AUXSOLIDSDIRECTION
|
||||||
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, sWriteValue)
|
||||||
|
Case Params.AUXSOLIDSOFFSETX
|
||||||
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, sWriteValue)
|
||||||
|
Case Params.AUXSOLIDSOFFSETY
|
||||||
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, sWriteValue)
|
||||||
Case Params.AUXSOLIDSCOASTINGLEN
|
Case Params.AUXSOLIDSCOASTINGLEN
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
|
||||||
Case Params.AUXSOLIDSWIPELEN
|
Case Params.AUXSOLIDSWIPELEN
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPELEN, sWriteValue)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPELEN, sWriteValue)
|
||||||
Case Params.AUXSOLIDSWIPEDIR
|
Case Params.AUXSOLIDSWIPEDIR
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
|
||||||
Case Params.CONSTANT
|
Case Params.FLOWRATE_PC
|
||||||
EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue)
|
EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue)
|
||||||
|
Case Params.CEILCOUNT
|
||||||
|
EgtSetInfo(nPartId, MAC_CEILCOUNT, sWriteValue)
|
||||||
|
Case Params.INFILLDENSITY
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLDENSITY, sWriteValue)
|
||||||
|
Case Params.INFILLOVERLAP
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLOVERLAP, sWriteValue)
|
||||||
|
Case Params.INFILLGRIDOVERLAP
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLGRIDOVERLAP, sWriteValue)
|
||||||
|
Case Params.INFILLDIRECTION
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLDIRECTION, sWriteValue)
|
||||||
|
Case Params.INFILLOFFSETX
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLOFFSETX, sWriteValue)
|
||||||
|
Case Params.INFILLOFFSETY
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLOFFSETY, sWriteValue)
|
||||||
|
Case Params.INFILLCOASTING
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLCOASTING, sWriteValue)
|
||||||
|
Case Params.INFILLWIPE
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLWIPE, sWriteValue)
|
||||||
|
Case Params.INFILLWIPEDIR
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLWIPEDIR, sWriteValue)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -592,8 +802,8 @@ Public Class CurrStringMachiningParam
|
|||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdResetParam As ICommand
|
Private m_cmdResetParam As ICommand
|
||||||
|
|
||||||
Sub New(Type As Params, nIndex As Integer)
|
Sub New(Type As Params, nIndex As Integer, Cathegory As MachiningCathegory)
|
||||||
MyBase.New(Type, nIndex)
|
MyBase.New(Type, nIndex, Cathegory)
|
||||||
m_sValue = sValue
|
m_sValue = sValue
|
||||||
m_sOrigValue = m_sValue
|
m_sOrigValue = m_sValue
|
||||||
End Sub
|
End Sub
|
||||||
@@ -648,6 +858,11 @@ Public Class CurrComboMachiningParam
|
|||||||
m_SelValue = value
|
m_SelValue = value
|
||||||
NotifyPropertyChanged(NameOf(SelValue))
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
||||||
|
ManageDependencyParam()
|
||||||
|
' se aggiorno SlicingType
|
||||||
|
If m_Type = Params.SLICINGTYPE Then
|
||||||
|
CurrentMachine.UpdateExtrusionArea()
|
||||||
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -667,16 +882,21 @@ Public Class CurrComboMachiningParam
|
|||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdResetParam As ICommand
|
Private m_cmdResetParam As ICommand
|
||||||
|
|
||||||
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
|
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
|
||||||
MyBase.New(Type, nIndex)
|
MyBase.New(Type, nIndex, Cathegory)
|
||||||
Dim bReadFromPart As Boolean = False
|
Dim bReadFromPart As Boolean = False
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.SLICINGTYPE
|
Case Params.SLICINGTYPE
|
||||||
Dim nHorizontalPrint As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_HORIZONTAL_PRINT, 0, CurrentMachine.sMachIniFile)
|
Dim nSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_SLICINGTYPE, 0, CurrentMachine.sMachIniFile)
|
||||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical"),
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical")})
|
||||||
New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal")})
|
If nSlicingType >= 1 Then
|
||||||
If nHorizontalPrint > 0 Then
|
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X"))
|
||||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45°"))
|
If nSlicingType >= 2 Then
|
||||||
|
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y"))
|
||||||
|
If nSlicingType >= 3 Then
|
||||||
|
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal"))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Dim nSelValue As Integer = 0
|
Dim nSelValue As Integer = 0
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGTYPE, nSelValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGTYPE, nSelValue)
|
||||||
@@ -719,10 +939,23 @@ Public Class CurrComboMachiningParam
|
|||||||
Dim nSelValue As Integer = 0
|
Dim nSelValue As Integer = 0
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_LEADOUT, nSelValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LEADOUT, nSelValue)
|
||||||
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_RIBSTYPE.INTERNAL, "Internal"),
|
||||||
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.EXTERNAL, "External"),
|
||||||
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.UNBOUNDED, "Unbounded"),
|
||||||
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.SUPPORT, "Support")})
|
||||||
|
Dim nSelValue As Integer = 0
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue)
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
Case Params.AUXSOLIDSINFILL
|
Case Params.AUXSOLIDSINFILL
|
||||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
|
||||||
New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
|
||||||
New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
|
||||||
Dim nSelValue As Integer = 0
|
Dim nSelValue As Integer = 0
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue)
|
||||||
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
@@ -739,22 +972,60 @@ Public Class CurrComboMachiningParam
|
|||||||
Dim nSelValue As Integer = 0
|
Dim nSelValue As Integer = 0
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, nSelValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, nSelValue)
|
||||||
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
Case Params.DYNAMIC_MODE
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.STANDARD, "Standard"),
|
||||||
|
New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.FAST, "Fast")})
|
||||||
|
Dim nSelValue As Integer = 0
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_DYNAMICMODE, nSelValue)
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
Case Params.FLOORTYPE
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
|
||||||
|
Dim nSelValue As Integer = 0
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_FLOORTYPE, nSelValue)
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
Case Params.CEILTYPE
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
|
||||||
|
Dim nSelValue As Integer = 0
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILTYPE, nSelValue)
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
Case Params.INFILLTYPE
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
|
||||||
|
Dim nSelValue As Integer = 0
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLTYPE, nSelValue)
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
End Select
|
End Select
|
||||||
m_OrigSelValue = m_SelValue
|
m_OrigSelValue = m_SelValue
|
||||||
If nIndex > 0 Then
|
If nIndex > 0 Then
|
||||||
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.SLICINGTYPE, Params.STRANDORDER, Params.DIRECTION
|
Case Params.SLICINGTYPE, Params.STRANDORDER, Params.DIRECTION, Params.DYNAMIC_MODE
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.LINKTYPE, Params.LEADIN, Params.LEADOUT
|
Case Params.LINKTYPE, Params.LEADIN, Params.LEADOUT
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.AUXSOLIDSINFILL, Params.AUXSOLIDSSTRANDORDER, Params.AUXSOLIDSLINKTYPE
|
Case Params.AUXSOLIDSINFILL, Params.AUXSOLIDSSTRANDORDER, Params.AUXSOLIDSLINKTYPE
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
|
Case Params.FLOORTYPE, Params.CEILTYPE, Params.INFILLTYPE
|
||||||
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
End Select
|
End Select
|
||||||
If bForceFromDb OrElse Not bReadFromPart Then
|
If bForceFromDb OrElse Not bReadFromPart Then
|
||||||
m_SelValue = m_DbParam.OrigSelValue
|
m_SelValue = m_DbParam.OrigSelValue
|
||||||
m_OrigSelValue = m_DbParam.OrigSelValue
|
m_OrigSelValue = m_DbParam.OrigSelValue
|
||||||
End If
|
End If
|
||||||
|
ElseIf Type = Params.RIBSTYPE AndAlso Not bReadFromPart Then
|
||||||
|
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_RIBSTYPE.INTERNAL)
|
||||||
|
m_SelValue = m_OrigSelValue
|
||||||
|
ElseIf Type = Params.DYNAMIC_MODE AndAlso Not bReadFromPart Then
|
||||||
|
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_DYNAMIC_MODE.STANDARD)
|
||||||
|
m_SelValue = m_OrigSelValue
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -772,12 +1043,22 @@ Public Class CurrComboMachiningParam
|
|||||||
EgtSetInfo(nPartId, MAC_LEADIN, m_SelValue.Id)
|
EgtSetInfo(nPartId, MAC_LEADIN, m_SelValue.Id)
|
||||||
Case Params.LEADOUT
|
Case Params.LEADOUT
|
||||||
EgtSetInfo(nPartId, MAC_LEADOUT, m_SelValue.Id)
|
EgtSetInfo(nPartId, MAC_LEADOUT, m_SelValue.Id)
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
EgtSetInfo(nPartId, MAC_RIBSTYPE, m_SelValue.Id)
|
||||||
Case Params.AUXSOLIDSINFILL
|
Case Params.AUXSOLIDSINFILL
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSINFILL, m_SelValue.Id)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSINFILL, m_SelValue.Id)
|
||||||
Case Params.AUXSOLIDSSTRANDORDER
|
Case Params.AUXSOLIDSSTRANDORDER
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDORDER, m_SelValue.Id)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDORDER, m_SelValue.Id)
|
||||||
Case Params.AUXSOLIDSLINKTYPE
|
Case Params.AUXSOLIDSLINKTYPE
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id)
|
||||||
|
Case Params.DYNAMIC_MODE
|
||||||
|
EgtSetInfo(nPartId, MAC_DYNAMICMODE, m_SelValue.Id)
|
||||||
|
Case Params.FLOORTYPE
|
||||||
|
EgtSetInfo(nPartId, MAC_FLOORTYPE, m_SelValue.Id)
|
||||||
|
Case Params.CEILTYPE
|
||||||
|
EgtSetInfo(nPartId, MAC_CEILTYPE, m_SelValue.Id)
|
||||||
|
Case Params.INFILLTYPE
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLTYPE, m_SelValue.Id)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -788,6 +1069,7 @@ Public Class CurrComboMachiningParam
|
|||||||
Friend Overrides Sub ResetParam()
|
Friend Overrides Sub ResetParam()
|
||||||
m_SelValue = m_OrigSelValue
|
m_SelValue = m_OrigSelValue
|
||||||
NotifyPropertyChanged(NameOf(SelValue))
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
|
CurrentMachine.UpdateExtrusionArea()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
@@ -807,6 +1089,7 @@ Public Class CurrComboMachiningParam
|
|||||||
m_SelValue = DbParam.OrigSelValue
|
m_SelValue = DbParam.OrigSelValue
|
||||||
NotifyPropertyChanged(NameOf(SelValue))
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
||||||
|
CurrentMachine.UpdateExtrusionArea()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' ResetParam
|
#End Region ' ResetParam
|
||||||
@@ -845,8 +1128,8 @@ Public Class CurrCheckMachiningParam
|
|||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdResetParam As ICommand
|
Private m_cmdResetParam As ICommand
|
||||||
|
|
||||||
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
|
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
|
||||||
MyBase.New(Type, nIndex)
|
MyBase.New(Type, nIndex, Cathegory)
|
||||||
Dim bReadFromPart As Boolean = False
|
Dim bReadFromPart As Boolean = False
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.SPIRALVASE
|
Case Params.SPIRALVASE
|
||||||
@@ -857,10 +1140,18 @@ Public Class CurrCheckMachiningParam
|
|||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTORDER, m_bValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTORDER, m_bValue)
|
||||||
Case Params.RIBSINVERTDIRECTION
|
Case Params.RIBSINVERTDIRECTION
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_bValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_bValue)
|
||||||
|
Case Params.RIBSINVERTSTRANDORDER
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTSTRANDORDER, m_bValue)
|
||||||
Case Params.RIBSLEADININVERT
|
Case Params.RIBSLEADININVERT
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADININVERT, m_bValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADININVERT, m_bValue)
|
||||||
Case Params.RIBSLEADOUTINVERT
|
Case Params.RIBSLEADOUTINVERT
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue)
|
||||||
|
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, m_bValue)
|
||||||
|
Case Params.AUXSOLIDSINFILLLINK
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, m_bValue)
|
||||||
|
Case Params.INFILLLINK
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLLINK, m_bValue)
|
||||||
End Select
|
End Select
|
||||||
m_bOrigValue = m_bValue
|
m_bOrigValue = m_bValue
|
||||||
If nIndex > 0 Then
|
If nIndex > 0 Then
|
||||||
@@ -868,8 +1159,12 @@ Public Class CurrCheckMachiningParam
|
|||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.SPIRALVASE
|
Case Params.SPIRALVASE
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT
|
Case Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
|
Case Params.AUXSOLIDSINFILLLINK
|
||||||
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
|
Case Params.INFILLLINK
|
||||||
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
End Select
|
End Select
|
||||||
If bForceFromDb OrElse Not bReadFromPart Then
|
If bForceFromDb OrElse Not bReadFromPart Then
|
||||||
m_bValue = m_DbParam.bOrigValue
|
m_bValue = m_DbParam.bOrigValue
|
||||||
@@ -888,10 +1183,18 @@ Public Class CurrCheckMachiningParam
|
|||||||
EgtSetInfo(nPartId, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0))
|
EgtSetInfo(nPartId, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0))
|
||||||
Case Params.RIBSINVERTDIRECTION
|
Case Params.RIBSINVERTDIRECTION
|
||||||
EgtSetInfo(nPartId, MAC_RIBSINVERTDIRECTION, If(m_bValue, 1, 0))
|
EgtSetInfo(nPartId, MAC_RIBSINVERTDIRECTION, If(m_bValue, 1, 0))
|
||||||
|
Case Params.RIBSINVERTSTRANDORDER
|
||||||
|
EgtSetInfo(nPartId, MAC_RIBSINVERTSTRANDORDER, If(m_bValue, 1, 0))
|
||||||
Case Params.RIBSLEADININVERT
|
Case Params.RIBSLEADININVERT
|
||||||
EgtSetInfo(nPartId, MAC_RIBSLEADININVERT, If(m_bValue, 1, 0))
|
EgtSetInfo(nPartId, MAC_RIBSLEADININVERT, If(m_bValue, 1, 0))
|
||||||
Case Params.RIBSLEADOUTINVERT
|
Case Params.RIBSLEADOUTINVERT
|
||||||
EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0))
|
EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0))
|
||||||
|
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||||
|
EgtSetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0))
|
||||||
|
Case Params.AUXSOLIDSINFILLLINK
|
||||||
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0))
|
||||||
|
Case Params.INFILLLINK
|
||||||
|
EgtSetInfo(nPartId, MAC_INFILLLINK, If(m_bValue, 1, 0))
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -929,3 +1232,107 @@ Public Class CurrCheckMachiningParam
|
|||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
Public Class CurrOrderedMachiningParam
|
||||||
|
Inherits OrderedMachiningParam
|
||||||
|
|
||||||
|
Private m_DbParam As OrderedMachiningParam
|
||||||
|
Public ReadOnly Property DbParam As OrderedMachiningParam
|
||||||
|
Get
|
||||||
|
Return m_DbParam
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property bIsModifiedFromDb As Boolean
|
||||||
|
Get
|
||||||
|
Return If(Map.refTopPanelVM.SelMachining.sGUID <> Guid.Empty, Value <> m_DbParam.Value, False)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdResetParam As ICommand
|
||||||
|
|
||||||
|
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
|
||||||
|
MyBase.New(Type, nIndex, Cathegory)
|
||||||
|
Dim bReadFromPart As Boolean = False
|
||||||
|
Select Case Type
|
||||||
|
Case Params.PRINT_ORDER
|
||||||
|
m_StandardValueOrderList = New List(Of Integer)({Machining.MPAR_PRINT_ORDER.SHELL,
|
||||||
|
Machining.MPAR_PRINT_ORDER.EXTRA_SHELL,
|
||||||
|
Machining.MPAR_PRINT_ORDER.INFILL,
|
||||||
|
Machining.MPAR_PRINT_ORDER.AUX_SOLID,
|
||||||
|
Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED,
|
||||||
|
Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL,
|
||||||
|
Machining.MPAR_PRINT_ORDER.RIB_INTERNAL,
|
||||||
|
Machining.MPAR_PRINT_ORDER.RIB_SUPPORT})
|
||||||
|
m_ValueList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_PRINT_ORDER.SHELL, "Shell"),
|
||||||
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.EXTRA_SHELL, "Extra Shell"),
|
||||||
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.INFILL, "Infill"),
|
||||||
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.AUX_SOLID, "Filled Solid"),
|
||||||
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED, "Unbounded Rib"),
|
||||||
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL, "External Rib"),
|
||||||
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_INTERNAL, "Internal Rib"),
|
||||||
|
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_SUPPORT, "Support Rib")})
|
||||||
|
Dim sValue As String = ""
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_PRINTORDER, sValue)
|
||||||
|
Value = sValue
|
||||||
|
End Select
|
||||||
|
m_OrigValue = Value
|
||||||
|
If nIndex > 0 Then
|
||||||
|
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
||||||
|
Select Case Type
|
||||||
|
Case Params.PRINT_ORDER
|
||||||
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
|
End Select
|
||||||
|
If bForceFromDb OrElse Not bReadFromPart Then
|
||||||
|
Value = m_DbParam.OrigValue
|
||||||
|
m_OrigValue = m_DbParam.OrigValue
|
||||||
|
End If
|
||||||
|
ElseIf Type = Params.PRINT_ORDER AndAlso Not bReadFromPart Then
|
||||||
|
Value = ""
|
||||||
|
m_OrigValue = Value
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub WriteParamInPart(nPartId As Integer)
|
||||||
|
Select Case Type
|
||||||
|
Case Params.PRINT_ORDER
|
||||||
|
EgtSetInfo(nPartId, MAC_PRINTORDER, Value)
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub SaveParam()
|
||||||
|
m_OrigValue = Value
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub ResetParam()
|
||||||
|
Value = m_OrigValue
|
||||||
|
m_SelValue = Nothing
|
||||||
|
NotifyPropertyChanged(NameOf(ValueList))
|
||||||
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "ResetParam"
|
||||||
|
|
||||||
|
Public ReadOnly Property ResetParam_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdResetParam Is Nothing Then
|
||||||
|
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdResetParam
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub ResetParamCmd()
|
||||||
|
Value = DbParam.OrigValue
|
||||||
|
NotifyPropertyChanged(NameOf(Value))
|
||||||
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ResetParam
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|||||||
@@ -1,17 +1,31 @@
|
|||||||
<UserControl x:Class="CurrMachiningPanelV"
|
<Grid x:Class="CurrMachiningPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:PrintApp="clr-namespace:Icarus"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
Width="300">
|
xmlns:PrintApp="clr-namespace:Icarus"
|
||||||
<Border VerticalAlignment="Center"
|
Width="310"
|
||||||
Style="{StaticResource RightPanel_Border}">
|
VerticalAlignment="Center">
|
||||||
<Grid>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Margin="0,0,0,2.5"
|
||||||
|
Style="{StaticResource Title_Border}">
|
||||||
|
<TextBlock Text="CURRENT MACHINING"
|
||||||
|
Style="{StaticResource Title_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Row="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="0,2.5,0,0"
|
||||||
|
Style="{StaticResource BottomGrayRow_Border}">
|
||||||
|
<Grid Margin="2.5,2.5,2.5,0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto"
|
<ScrollViewer VerticalScrollBarVisibility="Auto"
|
||||||
HorizontalScrollBarVisibility="Disabled">
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
|
Margin="1,0,0,2.5">
|
||||||
<ItemsControl Grid.Row="1"
|
<ItemsControl Grid.Row="1"
|
||||||
ItemsSource="{Binding CurrMachining.CathegoryList}">
|
ItemsSource="{Binding CurrMachining.CathegoryList}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
@@ -27,97 +41,178 @@
|
|||||||
<ItemsControl ItemsSource="{Binding MachiningParamList}">
|
<ItemsControl ItemsSource="{Binding MachiningParamList}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<UniformGrid Columns="1"
|
<StackPanel Orientation="Vertical"
|
||||||
HorizontalAlignment="Stretch"/>
|
Margin="0"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.Resources>
|
<ItemsControl.Resources>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
|
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
|
||||||
<Grid>
|
<Grid Margin="0,1,2.5,1"
|
||||||
|
IsEnabled="{Binding bIsActive}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBox Grid.Column="1"
|
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||||
Text="{Binding sValue}"/>
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
<TextBlock Text=" (BETA)"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Foreground="Red"
|
||||||
|
Visibility="{Binding IsBeta_Visibility}"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<EgtWPFLib5:EgtTextBox2 Grid.Column="1"
|
||||||
|
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBox2}"/>
|
||||||
<Button Grid.Column="2"
|
<Button Grid.Column="2"
|
||||||
Content="R"
|
Content="R"
|
||||||
Command="{Binding ResetParam_Command}"
|
Command="{Binding ResetParam_Command}"
|
||||||
IsEnabled="{Binding bIsModifiedFromDb}"
|
IsEnabled="{Binding bIsModifiedFromDb}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
Margin="5,0,0,0"
|
Margin="2.5,0,0,0"
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
|
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
|
||||||
<Grid>
|
<Grid Margin="0,1,2.5,1"
|
||||||
|
IsEnabled="{Binding bIsActive}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
<TextBlock Text=" (BETA)"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Foreground="Red"
|
||||||
|
Visibility="{Binding IsBeta_Visibility}"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
</StackPanel>
|
||||||
<ComboBox Grid.Column="1"
|
<ComboBox Grid.Column="1"
|
||||||
ItemsSource="{Binding ValueList}"
|
ItemsSource="{Binding ValueList}"
|
||||||
SelectedItem="{Binding SelValue}"
|
SelectedItem="{Binding SelValue}"
|
||||||
HorizontalAlignment="Stretch"/>
|
HorizontalAlignment="Stretch"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||||
<Button Grid.Column="2"
|
<Button Grid.Column="2"
|
||||||
Content="R"
|
Content="R"
|
||||||
Command="{Binding ResetParam_Command}"
|
Command="{Binding ResetParam_Command}"
|
||||||
IsEnabled="{Binding bIsModifiedFromDb}"
|
IsEnabled="{Binding bIsModifiedFromDb}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
Margin="5,0,0,0"
|
Margin="2.5,0,0,0"
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
|
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
|
||||||
<Grid>
|
<Grid Height="22"
|
||||||
|
Margin="0,1,2.5,1"
|
||||||
|
IsEnabled="{Binding bIsActive}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
<TextBlock Text=" (BETA)"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Foreground="Red"
|
||||||
|
Visibility="{Binding IsBeta_Visibility}"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
</StackPanel>
|
||||||
<CheckBox Grid.Column="1"
|
<CheckBox Grid.Column="1"
|
||||||
IsChecked="{Binding bValue}"
|
IsChecked="{Binding bValue}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"
|
||||||
|
Margin="2.5,0,0,0"/>
|
||||||
<Button Grid.Column="2"
|
<Button Grid.Column="2"
|
||||||
Content="R"
|
Content="R"
|
||||||
Command="{Binding ResetParam_Command}"
|
Command="{Binding ResetParam_Command}"
|
||||||
IsEnabled="{Binding bIsModifiedFromDb}"
|
IsEnabled="{Binding bIsModifiedFromDb}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
Margin="5,0,0,0"
|
Margin="2.5,0,0,0"
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:MaterialMachiningParam}">
|
<DataTemplate DataType="{x:Type PrintApp:MaterialMachiningParam}">
|
||||||
<Grid>
|
<Grid Height="22"
|
||||||
|
Margin="0,1,2.5,1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
<CheckBox Grid.Column="1"
|
<CheckBox Grid.Column="1"
|
||||||
IsChecked="{Binding bValue}"
|
IsChecked="{Binding bValue}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"
|
||||||
|
Margin="2.5,0,2.5,0"/>
|
||||||
<Button Grid.Column="2"
|
<Button Grid.Column="2"
|
||||||
Content="R"
|
Content="R"
|
||||||
Command="{Binding ResetParam_Command}"
|
Command="{Binding ResetParam_Command}"
|
||||||
IsEnabled="{Binding bIsModifiedFromDb}"
|
IsEnabled="{Binding bIsModifiedFromDb}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
Margin="5,0,0,0"
|
Margin="2.5,0,0,0"
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type PrintApp:OrderedMachiningParam}">
|
||||||
|
<Grid Margin="0,1,2.5,1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
<ListBox Grid.Column="1"
|
||||||
|
ItemsSource="{Binding ValueList}"
|
||||||
|
SelectedItem="{Binding SelValue}"
|
||||||
|
Margin="2.5,0,2.5,0"/>
|
||||||
|
<StackPanel Grid.Column="2"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="2.5,0,0,0">
|
||||||
|
<Button Content="˄"
|
||||||
|
Command="{Binding MoveUpOrder_Command}"
|
||||||
|
Margin="0,0,0,2.5"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
|
<Button Content="˅"
|
||||||
|
Command="{Binding MoveDownOrder_Command}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
|
<Button Content="<>"
|
||||||
|
Command="{Binding ResetOrder_Command}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
|
<Button Content="R"
|
||||||
|
Command="{Binding ResetParam_Command}"
|
||||||
|
IsEnabled="{Binding bIsModifiedFromDb}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
Margin="0,2.5,0,0"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
</ItemsControl.Resources>
|
</ItemsControl.Resources>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</Expander>
|
</Expander>
|
||||||
@@ -125,17 +220,29 @@
|
|||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
<UniformGrid Grid.Row="1" Rows="1">
|
<UniformGrid Grid.Row="1"
|
||||||
<Button Content="Ok"
|
Rows="1"
|
||||||
Command="{Binding Ok_Command}"
|
Margin="0,2.5,0,0">
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
<Button Command="{Binding Ok_Command}"
|
||||||
<Button Content="Cancel"
|
Margin="0,0,2.5,0"
|
||||||
Command="{Binding Cancel_Command}"
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
<Button Content="Save in Db"
|
Style="{StaticResource Button_Image}"/>
|
||||||
Command="{Binding SaveInDb_Command}"
|
</Button>
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
<Button Command="{Binding Cancel_Command}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Cancel.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding SaveInDb_Command}"
|
||||||
|
ToolTip="{Binding SaveInDb_ToolTip}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\CurrMachining\SaveInDb.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</Grid>
|
||||||
|
|||||||
@@ -18,6 +18,16 @@ Public Class CurrMachiningPanelVM
|
|||||||
Map.refTopPanelVM.UpdateCurrMachining()
|
Map.refTopPanelVM.UpdateCurrMachining()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "Tooltip"
|
||||||
|
|
||||||
|
Public ReadOnly Property SaveInDb_ToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Save in Db"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Tooltip
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdOk As ICommand
|
Private m_cmdOk As ICommand
|
||||||
Private m_cmdCancel As ICommand
|
Private m_cmdCancel As ICommand
|
||||||
@@ -59,8 +69,24 @@ Public Class CurrMachiningPanelVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub Ok()
|
Public Sub Ok()
|
||||||
|
' verifico se modificata tipologia Ribs
|
||||||
|
Dim bIsModifiedRibsType As Boolean = False
|
||||||
|
Dim RibsCathegory As MachiningCathegory = CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.RIBS)
|
||||||
|
If Not IsNothing(RibsCathegory) Then
|
||||||
|
Dim RibsTypeParam As MachiningParam = RibsCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.RIBSTYPE)
|
||||||
|
If Not IsNothing(RibsTypeParam) Then
|
||||||
|
bIsModifiedRibsType = RibsTypeParam.bIsModified
|
||||||
|
End If
|
||||||
|
End If
|
||||||
' scrivo i parametri modificati
|
' scrivo i parametri modificati
|
||||||
m_CurrMachining.WriteCurrParamInPart(Map.refTopPanelVM.SelPart.nPartId)
|
m_CurrMachining.WriteCurrParamInPart(Map.refTopPanelVM.SelPart.nPartId)
|
||||||
|
m_CurrMachining.Save()
|
||||||
|
' se modificata tipologia Ribs, aggiorno posizione riferimento
|
||||||
|
If bIsModifiedRibsType Then
|
||||||
|
Map.refReferencePanelVM.UpdateFramePosition()
|
||||||
|
Map.refDispositionPanelVM.UpdateZPos()
|
||||||
|
Map.refSliceManagerVM.UpdateDimensions()
|
||||||
|
End If
|
||||||
' ripristino modalita' standard
|
' ripristino modalita' standard
|
||||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<RadioButton x:Class="CheckedImageRadioButton"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<RadioButton.Resources>
|
||||||
|
<SolidColorBrush x:Key="RadioButton.MouseOver.Background" Color="White"/>
|
||||||
|
<SolidColorBrush x:Key="RadioButton.MouseOver.Border" Color="#FF5593FF"/>
|
||||||
|
<SolidColorBrush x:Key="RadioButton.Pressed.Background" Color="#afcfe9"/>
|
||||||
|
<SolidColorBrush x:Key="RadioButton.Pressed.Border" Color="#FF3C77DD"/>
|
||||||
|
<SolidColorBrush x:Key="RadioButton.Disabled.Background" Color="#FFE6E6E6"/>
|
||||||
|
<SolidColorBrush x:Key="RadioButton.Disabled.Border" Color="#FFBCBCBC"/>
|
||||||
|
</RadioButton.Resources>
|
||||||
|
<RadioButton.Template>
|
||||||
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
||||||
|
<Border x:Name="RadioButtonBorder"
|
||||||
|
CornerRadius="4"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
SnapsToDevicePixels="True">
|
||||||
|
<Image x:Name="RadioButtonImage"
|
||||||
|
Source="{Binding ImageSource, RelativeSource={RelativeSource AncestorType={x:Type ToggleButton}}}"
|
||||||
|
Stretch="Uniform"
|
||||||
|
Focusable="False"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="RadioButtonBorder" Value="{StaticResource RadioButton.MouseOver.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="RadioButtonBorder" Value="{StaticResource RadioButton.MouseOver.Border}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Background" TargetName="RadioButtonBorder" Value="{StaticResource RadioButton.Disabled.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="RadioButtonBorder" Value="{StaticResource RadioButton.Disabled.Border}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="RadioButtonBorder" Value="{StaticResource RadioButton.Pressed.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="RadioButtonBorder" Value="{StaticResource RadioButton.Pressed.Border}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Setter Property="Source" TargetName="RadioButtonImage" Value="{Binding CheckedImageSource, RelativeSource={RelativeSource AncestorType={x:Type ToggleButton}}}"/>
|
||||||
|
<Setter Property="Background" TargetName="RadioButtonBorder" Value="{StaticResource Icarus_Gray}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</RadioButton.Template>
|
||||||
|
</RadioButton>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
Public Class CheckedImageRadioButton
|
||||||
|
|
||||||
|
Public Shared ReadOnly ImageSourceProperty As DependencyProperty = DependencyProperty.Register("ImageSource", GetType(String), GetType(CheckedImageRadioButton), New FrameworkPropertyMetadata(""))
|
||||||
|
|
||||||
|
Public Shadows Property ImageSource As String
|
||||||
|
Get
|
||||||
|
Return CStr(MyBase.GetValue(ImageSourceProperty))
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
MyBase.SetValue(ImageSourceProperty, value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Shared ReadOnly CheckedImageSourceProperty As DependencyProperty = DependencyProperty.Register("CheckedImageSource", GetType(String), GetType(CheckedImageRadioButton), New FrameworkPropertyMetadata(""))
|
||||||
|
|
||||||
|
Public Shadows Property CheckedImageSource As String
|
||||||
|
Get
|
||||||
|
Return CStr(MyBase.GetValue(CheckedImageSourceProperty))
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
MyBase.SetValue(ImageSourceProperty, value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<ToggleButton x:Class="CheckedImageToggleButton"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<ToggleButton.Template>
|
||||||
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||||
|
<Border Name="ToggleButtonBorder"
|
||||||
|
CornerRadius="4"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
SnapsToDevicePixels="true">
|
||||||
|
<Image Name="ToggleButtonImage"
|
||||||
|
Height="{DynamicResource ToggleButton.Image.Height}"
|
||||||
|
Width="{DynamicResource ToggleButton.Image.Width}"
|
||||||
|
Stretch="Uniform"
|
||||||
|
Source="{Binding ImageSource, RelativeSource={RelativeSource AncestorType={x:Type ToggleButton}}}"
|
||||||
|
Focusable="False"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Button.IsDefaulted" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="ToggleButtonBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="ToggleButtonBorder" Value="{StaticResource Button.NoBackground.MouseOver.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="ToggleButtonBorder" Value="{StaticResource Button.NoBackground.MouseOver.Border}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="ToggleButtonBorder" Value="{StaticResource Button.NoBackground.Pressed.Background}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="ToggleButtonBorder" Value="{StaticResource Button.NoBackground.Pressed.Border}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Setter Property="Source" TargetName="ToggleButtonImage" Value="{Binding CheckedImageSource, RelativeSource={RelativeSource AncestorType={x:Type ToggleButton}}}"/>
|
||||||
|
<Setter Property="Background" TargetName="ToggleButtonBorder" Value="{StaticResource Icarus_Gray}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<!--<Setter Property="Background" TargetName="ToggleButtonBorder" Value="{StaticResource Button.NoBackground.Disabled.Background}"/>-->
|
||||||
|
<Setter Property="BorderBrush" TargetName="ToggleButtonBorder" Value="{StaticResource Button.NoBackground.Disabled.Border}"/>
|
||||||
|
<Setter Property="OpacityMask" Value="#54707070"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</ToggleButton.Template>
|
||||||
|
</ToggleButton>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
Public Class CheckedImageToggleButton
|
||||||
|
|
||||||
|
Public Shared ReadOnly ImageSourceProperty As DependencyProperty = DependencyProperty.Register("ImageSource", GetType(String), GetType(CheckedImageToggleButton), New FrameworkPropertyMetadata(""))
|
||||||
|
|
||||||
|
Public Shadows Property ImageSource As String
|
||||||
|
Get
|
||||||
|
Return CStr(MyBase.GetValue(ImageSourceProperty))
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
MyBase.SetValue(ImageSourceProperty, value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Shared ReadOnly CheckedImageSourceProperty As DependencyProperty = DependencyProperty.Register("CheckedImageSource", GetType(String), GetType(CheckedImageToggleButton), New FrameworkPropertyMetadata(""))
|
||||||
|
|
||||||
|
Public Shadows Property CheckedImageSource As String
|
||||||
|
Get
|
||||||
|
Return CStr(MyBase.GetValue(CheckedImageSourceProperty))
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
MyBase.SetValue(ImageSourceProperty, value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
<Grid x:Class="DispositionPanelV"
|
<Grid x:Class="DispositionPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
xmlns:PrintApp="clr-namespace:Icarus"
|
xmlns:PrintApp="clr-namespace:Icarus"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Margin="5">
|
Margin="5,0,0,0">
|
||||||
|
|
||||||
<Grid.Resources>
|
<Grid.Resources>
|
||||||
<PrintApp:CenterToolTipConverter x:Key="CenterToolTipConverter"/>
|
|
||||||
<PrintApp:FromBooleanToVisibility x:Key="FromBooleanToVisibility"/>
|
<PrintApp:FromBooleanToVisibility x:Key="FromBooleanToVisibility"/>
|
||||||
</Grid.Resources>
|
</Grid.Resources>
|
||||||
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
@@ -23,26 +24,21 @@
|
|||||||
<RowDefinition Height="{Binding ActualHeight, ElementName=MoveBtn}"/>
|
<RowDefinition Height="{Binding ActualHeight, ElementName=MoveBtn}"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ToggleButton x:Name="MoveBtn"
|
<ToggleButton x:Name="MoveBtn"
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Content="Move"
|
Content="Move"
|
||||||
IsChecked="{Binding bMove_IsChecked}"
|
IsChecked="{Binding bMove_IsChecked}"
|
||||||
Style="{StaticResource ToolBar_TextToggleButton}"/>
|
Margin="0,0,0,2.5"
|
||||||
<!--<Border Background="Red"
|
Style="{StaticResource LeftPanel_ToggleButton}"/>
|
||||||
Grid.Column="1"
|
|
||||||
Grid.Row="1"
|
|
||||||
Grid.RowSpan="5"
|
|
||||||
Width="50"
|
|
||||||
VerticalAlignment="Stretch"/>-->
|
|
||||||
|
|
||||||
<Border x:Name="PopupBrd"
|
<Border x:Name="PopupBrd"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.RowSpan="5"
|
Grid.RowSpan="5"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Margin="5,0,0,0"
|
|
||||||
Visibility="{Binding IsChecked, ElementName=MoveBtn, Converter={StaticResource FromBooleanToVisibility}}"
|
Visibility="{Binding IsChecked, ElementName=MoveBtn, Converter={StaticResource FromBooleanToVisibility}}"
|
||||||
Style="{StaticResource LeftPanelPopup_Border}">
|
Style="{StaticResource LeftPanel_Popup_Border}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
@@ -56,195 +52,91 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="X"
|
<TextBlock Text="X"
|
||||||
VerticalAlignment="Center"/>
|
Style="{StaticResource Move_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding sXPos, UpdateSourceTrigger=Explicit}"
|
<EgtWPFLib5:EgtTextBox2 Text="{Binding sXPos, UpdateSourceTrigger=Explicit}"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
Style="{StaticResource LeftPanel_TextBox2}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Row="1"
|
<Grid Grid.Row="1"
|
||||||
Margin="0,2.5,0,2.5">
|
Margin="0,2.5,0,2.5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="Y"
|
<TextBlock Text="Y"
|
||||||
VerticalAlignment="Center"/>
|
Style="{StaticResource Move_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding sYPos, UpdateSourceTrigger=Explicit}"
|
<EgtWPFLib5:EgtTextBox2 Text="{Binding sYPos, UpdateSourceTrigger=Explicit}"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
Style="{StaticResource LeftPanel_TextBox2}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Row="2"
|
<Grid Grid.Row="2"
|
||||||
Margin="0,2.5,0,0">
|
Margin="0,2.5,0,2.5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="Z"
|
<TextBlock Text="Z"
|
||||||
VerticalAlignment="Center"/>
|
Style="{StaticResource Move_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding sZPos, UpdateSourceTrigger=Explicit}"
|
<EgtWPFLib5:EgtTextBox2 Text="{Binding sZPos, UpdateSourceTrigger=Explicit}"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
Style="{StaticResource LeftPanel_TextBox2}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Row="3"
|
<Grid Grid.Row="3"
|
||||||
Margin="0,2.5,0,0">
|
Margin="0,2.5,0,0">
|
||||||
<Button Content="Drag"
|
<Button Content="Drag"
|
||||||
Command="{Binding DragMove_Command}"
|
Command="{Binding DragMove_Command}"
|
||||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!--<Popup IsOpen="{Binding IsChecked, ElementName=MoveBtn}"
|
|
||||||
PlacementTarget="{Binding ElementName=MoveBtn}"
|
|
||||||
Style="{StaticResource LeftPanel_Popup}">
|
|
||||||
<Border x:Name="PopupBrd" Style="{StaticResource LeftPanelPopup_Border}">
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid Margin="0,0,0,2.5">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TextBlock Text="X"
|
|
||||||
VerticalAlignment="Center"/>
|
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding sXPos, UpdateSourceTrigger=Explicit}"
|
|
||||||
Grid.Column="1"
|
|
||||||
Margin="5,0,0,0"
|
|
||||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
|
||||||
</Grid>
|
|
||||||
<Grid Grid.Row="1"
|
|
||||||
Margin="0,2.5,0,2.5">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TextBlock Text="Y"
|
|
||||||
VerticalAlignment="Center"/>
|
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding sYPos, UpdateSourceTrigger=Explicit}"
|
|
||||||
Grid.Column="1"
|
|
||||||
Margin="5,0,0,0"
|
|
||||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
|
||||||
</Grid>
|
|
||||||
<Grid Grid.Row="2"
|
|
||||||
Margin="0,2.5,0,0">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TextBlock Text="Z"
|
|
||||||
VerticalAlignment="Center"/>
|
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding sZPos, UpdateSourceTrigger=Explicit}"
|
|
||||||
Grid.Column="1"
|
|
||||||
Margin="5,0,0,0"
|
|
||||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
|
||||||
</Grid>
|
|
||||||
<Grid Grid.Row="3"
|
|
||||||
Margin="0,2.5,0,0">
|
|
||||||
<Button Content="Drag"
|
|
||||||
Command="{Binding DragMove_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
</Popup>-->
|
|
||||||
|
|
||||||
<ToggleButton x:Name="RotateBtn"
|
<ToggleButton x:Name="RotateBtn"
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
Content="Rotate"
|
Content="Rotate"
|
||||||
IsChecked="{Binding bRotate_IsChecked}"
|
IsChecked="{Binding bRotate_IsChecked}"
|
||||||
Style="{StaticResource ToolBar_TextToggleButton}"/>
|
Margin="0,2.5,0,0"
|
||||||
<!--<Border Background="Blue"
|
Style="{StaticResource LeftPanel_ToggleButton}"/>
|
||||||
Grid.Column="2"
|
|
||||||
Grid.Row="2"
|
|
||||||
Grid.RowSpan="5"
|
|
||||||
Width="50"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
HorizontalAlignment="Stretch"/>-->
|
|
||||||
|
|
||||||
<Border Grid.Column="1"
|
<Border Grid.Column="1"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.RowSpan="5"
|
Grid.RowSpan="5"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Margin="5,0,0,0"
|
|
||||||
Visibility="{Binding IsChecked, ElementName=RotateBtn, Converter={StaticResource FromBooleanToVisibility}}"
|
Visibility="{Binding IsChecked, ElementName=RotateBtn, Converter={StaticResource FromBooleanToVisibility}}"
|
||||||
Style="{StaticResource LeftPanelPopup_Border}">
|
Style="{StaticResource LeftPanel_Popup_Border}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<UniformGrid Columns="3">
|
<UniformGrid Columns="3">
|
||||||
<RadioButton Content="X"
|
<RadioButton Content="X"
|
||||||
GroupName="Axes"
|
GroupName="Axes"
|
||||||
IsChecked="{Binding RotAxes[0]}"
|
IsChecked="{Binding RotX}"
|
||||||
Style="{StaticResource ToolBar_ToggleButton}"/>
|
Style="{StaticResource ToolBar_ToggleButton}"/>
|
||||||
<RadioButton Content="Y"
|
<RadioButton Content="Y"
|
||||||
GroupName="Axes"
|
GroupName="Axes"
|
||||||
IsChecked="{Binding RotAxes[1]}"
|
IsChecked="{Binding RotY}"
|
||||||
Style="{StaticResource ToolBar_ToggleButton}"/>
|
Style="{StaticResource ToolBar_ToggleButton}"/>
|
||||||
<RadioButton Content="Z"
|
<RadioButton Content="Z"
|
||||||
GroupName="Axes"
|
GroupName="Axes"
|
||||||
IsChecked="{Binding RotAxes[2]}"
|
IsChecked="{Binding RotZ}"
|
||||||
Style="{StaticResource ToolBar_ToggleButton}"/>
|
Style="{StaticResource ToolBar_ToggleButton}"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
<EgtWPFLib5:EgtTextBox2 Grid.Row="1"
|
||||||
Text="{Binding sRotAngle, UpdateSourceTrigger=Explicit}"
|
Text="{Binding sRotAngle, UpdateSourceTrigger=Explicit}"
|
||||||
Margin="0,5,0,0"/>
|
ResetValueOnLostFocus="False"
|
||||||
|
Margin="0,5,0,2.5"/>
|
||||||
<Grid Grid.Row="2"
|
<Grid Grid.Row="2"
|
||||||
Margin="0,2.5,0,0">
|
Margin="0,2.5,0,0">
|
||||||
<Button Content="Drag"
|
<Button Content="Drag"
|
||||||
Command="{Binding DragRotate_Command}"
|
Command="{Binding DragRotate_Command}"
|
||||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!--<Popup IsOpen="{Binding IsChecked, ElementName=RotateBtn}"
|
|
||||||
Grid.Column="1"
|
|
||||||
PlacementTarget="{Binding ElementName=RotateBtn}"
|
|
||||||
Style="{StaticResource LeftPanel_Popup}">
|
|
||||||
<Border Style="{StaticResource LeftPanelPopup_Border}">
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<UniformGrid Columns="3">
|
|
||||||
<RadioButton Content="X"
|
|
||||||
GroupName="Axes"
|
|
||||||
IsChecked="{Binding RotAxes[0]}"
|
|
||||||
Style="{StaticResource ToolBar_ToggleButton}"/>
|
|
||||||
<RadioButton Content="Y"
|
|
||||||
GroupName="Axes"
|
|
||||||
IsChecked="{Binding RotAxes[1]}"
|
|
||||||
Style="{StaticResource ToolBar_ToggleButton}"/>
|
|
||||||
<RadioButton Content="Z"
|
|
||||||
GroupName="Axes"
|
|
||||||
IsChecked="{Binding RotAxes[2]}"
|
|
||||||
Style="{StaticResource ToolBar_ToggleButton}"/>
|
|
||||||
</UniformGrid>
|
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
|
||||||
Text="{Binding sRotAngle, UpdateSourceTrigger=Explicit}"
|
|
||||||
Margin="0,5,0,0"/>
|
|
||||||
<Grid Grid.Row="2"
|
|
||||||
Margin="0,2.5,0,0">
|
|
||||||
<Button Content="Drag"
|
|
||||||
Command="{Binding DragRotate_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
</Popup>-->
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -20,13 +20,27 @@ Public Class DispositionPanelVM
|
|||||||
EgtStartPoint(Map.refTopPanelVM.SelPart.nReferenceId, GDB_ID.ROOT, ptReference)
|
EgtStartPoint(Map.refTopPanelVM.SelPart.nReferenceId, GDB_ID.ROOT, ptReference)
|
||||||
Dim dNewXPos As Double = ptReference.x
|
Dim dNewXPos As Double = ptReference.x
|
||||||
StringToLen(value, dNewXPos)
|
StringToLen(value, dNewXPos)
|
||||||
If dNewXPos >= 0 AndAlso dNewXPos <= CurrentMachine.b3Tab.DimX Then
|
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||||
EgtMove(Map.refTopPanelVM.SelPart.nPartId, New Point3d(dNewXPos, ptReference.y, ptReference.z) - ptReference)
|
Dim dMin As Double = 0
|
||||||
EgtDraw()
|
Dim dMax As Double = CurrentMachine.b3Tab.DimX
|
||||||
Else
|
If b3Print.Max.x > ptReference.x Then
|
||||||
NotifyPropertyChanged(NameOf(sXPos))
|
dMax -= b3Print.Max.x - ptReference.x
|
||||||
End If
|
End If
|
||||||
|
If b3Print.Min.x < ptReference.x Then
|
||||||
|
dMin += ptReference.x - b3Print.Min.x
|
||||||
|
End If
|
||||||
|
' riduco a spostamento massimo
|
||||||
|
If dNewXPos < dMin Then
|
||||||
|
dNewXPos = dMin
|
||||||
|
ElseIf dNewXPos > dMax Then
|
||||||
|
dNewXPos = dMax
|
||||||
|
End If
|
||||||
|
EgtMove(Map.refTopPanelVM.SelPart.nPartId, New Point3d(dNewXPos, ptReference.y, ptReference.z) - ptReference, GDB_RT.GLOB)
|
||||||
Map.refReferencePanelVM.UpdateFramePosition()
|
Map.refReferencePanelVM.UpdateFramePosition()
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(sXPos))
|
||||||
|
' Imposto flag di ricalcolo part-program
|
||||||
|
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_GENERATE, True)
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -45,13 +59,27 @@ Public Class DispositionPanelVM
|
|||||||
EgtStartPoint(Map.refTopPanelVM.SelPart.nReferenceId, GDB_ID.ROOT, ptReference)
|
EgtStartPoint(Map.refTopPanelVM.SelPart.nReferenceId, GDB_ID.ROOT, ptReference)
|
||||||
Dim dNewYPos As Double = ptReference.y
|
Dim dNewYPos As Double = ptReference.y
|
||||||
StringToLen(value, dNewYPos)
|
StringToLen(value, dNewYPos)
|
||||||
If dNewYPos >= 0 AndAlso dNewYPos <= CurrentMachine.b3Tab.DimY Then
|
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||||
EgtMove(Map.refTopPanelVM.SelPart.nPartId, New Point3d(ptReference.x, dNewYPos, ptReference.z) - ptReference)
|
Dim dMin As Double = 0
|
||||||
EgtDraw()
|
Dim dMax As Double = CurrentMachine.b3Tab.DimY
|
||||||
Else
|
If b3Print.Max.y > ptReference.y Then
|
||||||
NotifyPropertyChanged(NameOf(sYPos))
|
dMax -= b3Print.Max.y - ptReference.y
|
||||||
End If
|
End If
|
||||||
|
If b3Print.Min.y < ptReference.y Then
|
||||||
|
dMin += ptReference.y - b3Print.Min.y
|
||||||
|
End If
|
||||||
|
' riduco a spostamento massimo
|
||||||
|
If dNewYPos < dMin Then
|
||||||
|
dNewYPos = dMin
|
||||||
|
ElseIf dNewyPos > dMax Then
|
||||||
|
dNewYPos = dMax
|
||||||
|
End If
|
||||||
|
EgtMove(Map.refTopPanelVM.SelPart.nPartId, New Point3d(ptReference.x, dNewYPos, ptReference.z) - ptReference, GDB_RT.GLOB)
|
||||||
Map.refReferencePanelVM.UpdateFramePosition()
|
Map.refReferencePanelVM.UpdateFramePosition()
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(sYPos))
|
||||||
|
' Imposto flag di ricalcolo part-program
|
||||||
|
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_GENERATE, True)
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -59,7 +87,7 @@ Public Class DispositionPanelVM
|
|||||||
Get
|
Get
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||||
Dim ptReference As New Point3d
|
Dim ptReference As New Point3d
|
||||||
EgtStartPoint(Map.refTopPanelVM.SelPart.nReferenceId, GDB_ID.ROOT, ptReference)
|
EgtStartPoint(Map.refTopPanelVM.SelPart.nPartReferenceId, GDB_ID.ROOT, ptReference)
|
||||||
Return LenToString(ptReference.z, 1)
|
Return LenToString(ptReference.z, 1)
|
||||||
Else
|
Else
|
||||||
Return ""
|
Return ""
|
||||||
@@ -67,26 +95,93 @@ Public Class DispositionPanelVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim ptReference As New Point3d
|
Dim ptReference As New Point3d
|
||||||
EgtStartPoint(Map.refTopPanelVM.SelPart.nReferenceId, GDB_ID.ROOT, ptReference)
|
EgtStartPoint(Map.refTopPanelVM.SelPart.nPartReferenceId, GDB_ID.ROOT, ptReference)
|
||||||
Dim dNewZPos As Double = ptReference.z
|
Dim dNewZPos As Double = ptReference.z
|
||||||
StringToLen(value, dNewZPos)
|
StringToLen(value, dNewZPos)
|
||||||
If dNewZPos >= 0 Then
|
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||||
EgtMove(Map.refTopPanelVM.SelPart.nPartId, New Point3d(ptReference.x, ptReference.y, dNewZPos) - ptReference)
|
Dim dMin As Double = 0
|
||||||
EgtDraw()
|
If b3Print.Min.z < ptReference.z Then
|
||||||
Else
|
dMin += ptReference.z - b3Print.Min.z
|
||||||
NotifyPropertyChanged(NameOf(sZPos))
|
|
||||||
End If
|
End If
|
||||||
|
' riduco a spostamento massimo
|
||||||
|
If dNewZPos < dMin Then
|
||||||
|
dNewZPos = dMin
|
||||||
|
End If
|
||||||
|
EgtMove(Map.refTopPanelVM.SelPart.nPartId, New Point3d(ptReference.x, ptReference.y, dNewZPos) - ptReference, GDB_RT.GLOB)
|
||||||
Map.refReferencePanelVM.UpdateFramePosition()
|
Map.refReferencePanelVM.UpdateFramePosition()
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(sZPos))
|
||||||
|
' Imposto flag di ricalcolo part-program
|
||||||
|
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_GENERATE, True)
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_RotAxes() As Boolean = {False, False, True}
|
Friend Sub UpdateZPos()
|
||||||
Public Property RotAxes As Boolean()
|
Dim ptReference As New Point3d
|
||||||
|
EgtStartPoint(Map.refTopPanelVM.SelPart.nPartReferenceId, GDB_ID.ROOT, ptReference)
|
||||||
|
Dim dNewZPos As Double = ptReference.z
|
||||||
|
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||||
|
Dim dMin As Double = 0
|
||||||
|
If b3Print.Min.z < ptReference.z Then
|
||||||
|
dMin += ptReference.z - b3Print.Min.z
|
||||||
|
End If
|
||||||
|
If ptReference.z < dMin Then
|
||||||
|
EgtMove(Map.refTopPanelVM.SelPart.nPartId, New Point3d(ptReference.x, ptReference.y, dMin) - ptReference, GDB_RT.GLOB)
|
||||||
|
Map.refDispositionPanelVM.RefreshPos()
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(sZPos))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione che calcola il box totale del solido da stampare piu' ribs esterne ed unbounded
|
||||||
|
Friend Function GetSolidForReferenceBBox(SelPart As Print3dPartVM) As BBox3d
|
||||||
|
Dim b3Print As New BBox3d
|
||||||
|
EgtGetBBoxGlob(SelPart.nPrintSolidId, GDB_BB.EXACT, b3Print)
|
||||||
|
If EgtGetGroupObjs(SelPart.nRibsLayerId) > 0 Then
|
||||||
|
Dim b3Ribs As New BBox3d()
|
||||||
|
Dim nRibId As Integer = EgtGetFirstInGroup(SelPart.nRibsLayerId)
|
||||||
|
While nRibId <> GDB_ID.NULL
|
||||||
|
Dim nRibType As Integer = Machining.MPAR_RIBSTYPE.INTERNAL
|
||||||
|
If Not EgtGetInfo(nRibId, MAC_RIBSTYPE, nRibType) Then
|
||||||
|
EgtGetInfo(SelPart.nPartId, MAC_RIBSTYPE, nRibType)
|
||||||
|
End If
|
||||||
|
If nRibType = Machining.MPAR_RIBSTYPE.EXTERNAL OrElse nRibType = Machining.MPAR_RIBSTYPE.UNBOUNDED Then
|
||||||
|
Dim b3Rib As New BBox3d
|
||||||
|
EgtGetBBoxGlob(nRibId, GDB_BB.EXACT, b3Rib)
|
||||||
|
b3Ribs.Add(b3Rib)
|
||||||
|
End If
|
||||||
|
nRibId = EgtGetNext(nRibId)
|
||||||
|
End While
|
||||||
|
If Not b3Ribs.IsEmpty() Then
|
||||||
|
b3Print.Add(b3Ribs)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return b3Print
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private m_RotAxes As Boolean() = { False, False, False}
|
||||||
|
Public Property RotX As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_RotAxes
|
Return m_RotAxes(0)
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean())
|
Set(value As Boolean)
|
||||||
m_RotAxes = value
|
m_RotAxes(0) = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Property RotY As Boolean
|
||||||
|
Get
|
||||||
|
Return m_RotAxes(1)
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_RotAxes(1) = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Property RotZ As Boolean
|
||||||
|
Get
|
||||||
|
Return m_RotAxes(2)
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_RotAxes(2) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -96,7 +191,7 @@ Public Class DispositionPanelVM
|
|||||||
Return Vector3d.X_AX
|
Return Vector3d.X_AX
|
||||||
ElseIf m_RotAxes(1) Then
|
ElseIf m_RotAxes(1) Then
|
||||||
Return Vector3d.Y_AX
|
Return Vector3d.Y_AX
|
||||||
ElseIf m_RotAxes(2) Then
|
Else
|
||||||
Return Vector3d.Z_AX
|
Return Vector3d.Z_AX
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
@@ -109,22 +204,39 @@ Public Class DispositionPanelVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dNewAngle As Double = 0
|
Dim dNewAngle As Double = 0
|
||||||
If Not StringToLen(value, dNewAngle) Then
|
If IsNothing( value) OrElse Not StringToLen(value, dNewAngle) Then
|
||||||
m_sRotAngle = 0
|
m_sRotAngle = 0
|
||||||
NotifyPropertyChanged(NameOf(sRotAngle))
|
NotifyPropertyChanged(NameOf(sRotAngle))
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim vtMovedPart As Vector3d
|
||||||
|
If EgtGetInfo(Map.refTopPanelVM.SelPart.nPartId, KEY_MOVEDPART, vtMovedPart) Then
|
||||||
|
Dim nEntId = EgtGetFirstInGroup(Map.refTopPanelVM.SelPart.nPrintSolidLayerId)
|
||||||
|
While nEntId <> GDB_ID.NULL
|
||||||
|
EgtMove(nEntId, -vtMovedPart, GDB_RT.GLOB)
|
||||||
|
nEntId = EgtGetNext(nEntId)
|
||||||
|
End While
|
||||||
|
EgtRemoveInfo(Map.refTopPanelVM.SelPart.nPartId, KEY_MOVEDPART)
|
||||||
|
End If
|
||||||
|
If EgtGetInfo(Map.refTopPanelVM.SelPart.nPartId, KEY_MOVEDPART2, vtMovedPart) Then
|
||||||
|
EgtMove(Map.refTopPanelVM.SelPart.nPartId, -vtMovedPart, GDB_RT.GLOB)
|
||||||
|
EgtMove(Map.refTopPanelVM.SelPart.nReferenceId, vtMovedPart, GDB_RT.GLOB)
|
||||||
|
EgtRemoveInfo(Map.refTopPanelVM.SelPart.nPartId, KEY_MOVEDPART2)
|
||||||
|
End If
|
||||||
Dim b3PrintSolid As New BBox3d
|
Dim b3PrintSolid As New BBox3d
|
||||||
EgtGetBBoxGlob(Map.refTopPanelVM.SelPart.nPartId, GDB_BB.STANDARD, b3PrintSolid)
|
EgtGetBBoxGlob(Map.refTopPanelVM.SelPart.nPartId, GDB_BB.STANDARD, b3PrintSolid)
|
||||||
If EgtRotate(Map.refTopPanelVM.SelPart.nPartId, b3PrintSolid.Center, vtSelRotAxes, dNewAngle) Then
|
If EgtRotate(Map.refTopPanelVM.SelPart.nPartId, b3PrintSolid.Center, vtSelRotAxes, dNewAngle, GDB_RT.GLOB) Then
|
||||||
EgtDraw()
|
|
||||||
RefreshPos()
|
|
||||||
m_sRotAngle = 0
|
m_sRotAngle = 0
|
||||||
|
Map.refReferencePanelVM.UpdateFramePosition()
|
||||||
|
Map.refDispositionPanelVM.UpdateZPos()
|
||||||
|
RefreshPos()
|
||||||
|
EgtDraw()
|
||||||
NotifyPropertyChanged(NameOf(sRotAngle))
|
NotifyPropertyChanged(NameOf(sRotAngle))
|
||||||
|
' Imposto flag di ricalcolo slice
|
||||||
|
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||||
Else
|
Else
|
||||||
m_sRotAngle = value
|
m_sRotAngle = value
|
||||||
End If
|
End If
|
||||||
Map.refReferencePanelVM.UpdateFramePosition()
|
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -178,7 +290,8 @@ Public Class DispositionPanelVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub Init()
|
Friend Sub Init()
|
||||||
|
RotZ = True
|
||||||
|
NotifyPropertyChanged(NameOf(RotZ))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub RefreshPos()
|
Friend Sub RefreshPos()
|
||||||
@@ -193,6 +306,7 @@ Public Class DispositionPanelVM
|
|||||||
' seleziono percorso corrente
|
' seleziono percorso corrente
|
||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
EgtSelectObj(Map.refTopPanelVM.SelPart.nPartId)
|
EgtSelectObj(Map.refTopPanelVM.SelPart.nPartId)
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub UpdateUI()
|
Friend Sub UpdateUI()
|
||||||
@@ -201,8 +315,9 @@ Public Class DispositionPanelVM
|
|||||||
m_bRotating = False
|
m_bRotating = False
|
||||||
' ripristino griglia
|
' ripristino griglia
|
||||||
EgtSetGridFrame(m_PrevGridOrigin)
|
EgtSetGridFrame(m_PrevGridOrigin)
|
||||||
EgtDraw()
|
|
||||||
End If
|
End If
|
||||||
|
EgtDeselectAll()
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub OnKeyDown(Key As Forms.Keys)
|
Friend Sub OnKeyDown(Key As Forms.Keys)
|
||||||
@@ -211,8 +326,9 @@ Public Class DispositionPanelVM
|
|||||||
m_bRotating = False
|
m_bRotating = False
|
||||||
' ripristino griglia
|
' ripristino griglia
|
||||||
EgtSetGridFrame(m_PrevGridOrigin)
|
EgtSetGridFrame(m_PrevGridOrigin)
|
||||||
EgtDraw()
|
|
||||||
End If
|
End If
|
||||||
|
EgtDeselectAll()
|
||||||
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -279,26 +395,6 @@ Public Class DispositionPanelVM
|
|||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class CenterToolTipConverter
|
|
||||||
Implements IMultiValueConverter
|
|
||||||
|
|
||||||
Public Function Convert(ByVal values As Object(), ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
|
|
||||||
For Each value In values
|
|
||||||
If TypeOf (value) IsNot Double Then
|
|
||||||
Return Double.NaN
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Dim placementTargetHeight As Double = CDbl(values(0))
|
|
||||||
Dim toolTipHeight As Double = CDbl(values(1))
|
|
||||||
Return (placementTargetHeight / 2.0) - (toolTipHeight / 2.0)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function ConvertBack(ByVal value As Object, ByVal targetTypes As Type(), ByVal parameter As Object, ByVal culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
|
||||||
Throw New NotSupportedException()
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class FromBooleanToVisibility
|
Public Class FromBooleanToVisibility
|
||||||
Implements IValueConverter
|
Implements IValueConverter
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,361 @@
|
|||||||
|
<Grid x:Class="FilledSolidPanelV"
|
||||||
|
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:PrintApp="clr-namespace:Icarus"
|
||||||
|
Margin="5">
|
||||||
|
<Grid.Resources>
|
||||||
|
<PrintApp:FromBooleanToVisibility x:Key="FromBooleanToVisibility"/>
|
||||||
|
</Grid.Resources>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="{Binding ActualHeight, ElementName=MoveBtn}"/>
|
||||||
|
<RowDefinition Height="{Binding ActualHeight, ElementName=MoveBtn}"/>
|
||||||
|
<RowDefinition Height="{Binding ActualHeight, ElementName=MoveBtn}"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="{Binding ActualHeight, ElementName=MoveBtn}"/>
|
||||||
|
<RowDefinition Height="{Binding ActualHeight, ElementName=MoveBtn}"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ComboBox Grid.Row="3"
|
||||||
|
ItemsSource="{Binding FilledSolidList}"
|
||||||
|
SelectedItem="{Binding SelFilledSolid}"
|
||||||
|
IsEnabled="{Binding FilledSolidList_IsEnabled}"
|
||||||
|
DisplayMemberPath="ghName"
|
||||||
|
Style="{StaticResource LeftPanel_ComboBox}"/>
|
||||||
|
<!--Add Button-->
|
||||||
|
<ToggleButton x:Name="AddBtn"
|
||||||
|
Grid.Row="4"
|
||||||
|
Content="Add"
|
||||||
|
IsChecked="{Binding bAdd_IsChecked}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource LeftPanel_ToggleButton}"/>
|
||||||
|
<Border Grid.Column="1"
|
||||||
|
Grid.Row="3"
|
||||||
|
Grid.RowSpan="3"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Visibility="{Binding IsChecked, ElementName=AddBtn, Converter={StaticResource FromBooleanToVisibility}}"
|
||||||
|
Style="{StaticResource LeftPanel_PopupButton_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Grid.Column="0"
|
||||||
|
Command="{Binding Import_Command}"
|
||||||
|
ToolTip="{Binding Import_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Import.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Command="{Binding Line2P_Command}"
|
||||||
|
ToolTip="{Binding Line2P_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/DrawPanel/Line2P.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<!--Edit Button-->
|
||||||
|
<ToggleButton x:Name="EditBtn"
|
||||||
|
Grid.Row="5"
|
||||||
|
Content="Edit"
|
||||||
|
IsChecked="{Binding bEdit_IsChecked}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource LeftPanel_ToggleButton}"/>
|
||||||
|
<Border Grid.Column="1"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.RowSpan="3"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Visibility="{Binding IsChecked, ElementName=EditBtn, Converter={StaticResource FromBooleanToVisibility}}"
|
||||||
|
Style="{StaticResource LeftPanel_PopupButton_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Grid.Column="0"
|
||||||
|
Command="{Binding Delete_Command}"
|
||||||
|
ToolTip="{Binding Delete_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/DrawPanel/Delete.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Command="{Binding ModifyCurve_Command}"
|
||||||
|
ToolTip="{Binding ModifyCurve_ToolTip}"
|
||||||
|
Visibility="{Binding Compo_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/DrawPanel/ModifyCurve.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
Command="{Binding AddPointCurve_Command}"
|
||||||
|
ToolTip="{Binding AddPointCurve_ToolTip}"
|
||||||
|
Visibility="{Binding Compo_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/DrawPanel/AddPointCurve.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="3"
|
||||||
|
Command="{Binding RemovePointCurve_Command}"
|
||||||
|
ToolTip="{Binding RemovePointCurve_ToolTip}"
|
||||||
|
Visibility="{Binding Compo_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/DrawPanel/RemovePointCurve.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="4"
|
||||||
|
Command="{Binding Extrude_Command}"
|
||||||
|
ToolTip="{Binding Extrude_ToolTip}"
|
||||||
|
Visibility="{Binding Compo_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/DrawPanel/Extrude.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<!--Grid Button-->
|
||||||
|
<ToggleButton x:Name="GridBtn"
|
||||||
|
Grid.Row="6"
|
||||||
|
Content="Grid"
|
||||||
|
IsChecked="{Binding bGrid_IsChecked}"
|
||||||
|
IsEnabled="{Binding bGrid_IsEnabled}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource LeftPanel_ToggleButton}"/>
|
||||||
|
<Border Grid.Column="1"
|
||||||
|
Grid.Row="5"
|
||||||
|
Grid.RowSpan="3"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Visibility="{Binding IsChecked, ElementName=GridBtn, Converter={StaticResource FromBooleanToVisibility}}"
|
||||||
|
Style="{StaticResource LeftPanel_PopupButton_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Command="{Binding CPlaneTop_Command}"
|
||||||
|
ToolTip="{Binding CPlaneTop_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/GridViewPanel/CplaneTOP.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Command="{Binding CPlaneFront_Command}"
|
||||||
|
ToolTip="{Binding CPlaneFront_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/GridViewPanel/CplaneFRONT.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
Command="{Binding CPlaneRight_Command}"
|
||||||
|
ToolTip="{Binding CPlaneRight_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/GridViewPanel/CplaneRIGHT.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="3"
|
||||||
|
Command="{Binding CPlaneBack_Command}"
|
||||||
|
ToolTip="{Binding CPlaneBack_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/GridViewPanel/CplaneBACK.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="4"
|
||||||
|
Command="{Binding CPlaneLeft_Command}"
|
||||||
|
ToolTip="{Binding CPlaneLeft_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/GridViewPanel/CplaneLEFT.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="5"
|
||||||
|
Command="{Binding CPlaneBottom_Command}"
|
||||||
|
ToolTip="{Binding CPlaneBottom_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/GridViewPanel/CplaneBOTTOM.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="6"
|
||||||
|
Command="{Binding CPlaneElevation_Command}"
|
||||||
|
ToolTip="{Binding CPlaneElevation_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="7"
|
||||||
|
Command="{Binding CPlaneOrigin_Command}"
|
||||||
|
ToolTip="{Binding CPlaneOrigin_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/GridViewPanel/CPlaneORIGIN.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="8"
|
||||||
|
Command="{Binding CPlaneObj_Command}"
|
||||||
|
ToolTip="{Binding CPlaneObj_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<!--Move Button-->
|
||||||
|
<ToggleButton x:Name="MoveBtn"
|
||||||
|
Grid.Row="7"
|
||||||
|
Content="Move"
|
||||||
|
IsChecked="{Binding bMove_IsChecked}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource LeftPanel_ToggleButton}"/>
|
||||||
|
<Border Grid.Column="1"
|
||||||
|
Grid.Row="5"
|
||||||
|
Grid.RowSpan="5"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Visibility="{Binding IsChecked, ElementName=MoveBtn, Converter={StaticResource FromBooleanToVisibility}}"
|
||||||
|
Style="{StaticResource LeftPanel_Popup_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Margin="0,0,0,2.5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="X"
|
||||||
|
Style="{StaticResource Move_TextBlock}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox2 Text="{Binding sXPos, UpdateSourceTrigger=Explicit}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="5,0,0,0"
|
||||||
|
Style="{StaticResource LeftPanel_TextBox2}"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="1"
|
||||||
|
Margin="0,2.5,0,2.5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="Y"
|
||||||
|
Style="{StaticResource Move_TextBlock}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox2 Text="{Binding sYPos, UpdateSourceTrigger=Explicit}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="5,0,0,0"
|
||||||
|
Style="{StaticResource LeftPanel_TextBox2}"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="2"
|
||||||
|
Margin="0,2.5,0,2.5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="Z"
|
||||||
|
Style="{StaticResource Move_TextBlock}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox2 Text="{Binding sZPos, UpdateSourceTrigger=Explicit}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="5,0,0,0"
|
||||||
|
Style="{StaticResource LeftPanel_TextBox2}"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="3"
|
||||||
|
Margin="0,2.5,0,0">
|
||||||
|
<Button Content="Drag"
|
||||||
|
Command="{Binding DragMove_Command}"
|
||||||
|
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<!--Rotate Button-->
|
||||||
|
<ToggleButton x:Name="RotateBtn"
|
||||||
|
Grid.Row="8"
|
||||||
|
Content="Rotate"
|
||||||
|
IsChecked="{Binding bRotate_IsChecked}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource LeftPanel_ToggleButton}"/>
|
||||||
|
<Border Grid.Column="1"
|
||||||
|
Grid.Row="6"
|
||||||
|
Grid.RowSpan="5"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Visibility="{Binding IsChecked, ElementName=RotateBtn, Converter={StaticResource FromBooleanToVisibility}}"
|
||||||
|
Style="{StaticResource LeftPanel_Popup_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<UniformGrid Columns="3">
|
||||||
|
<RadioButton Content="X"
|
||||||
|
GroupName="Axes"
|
||||||
|
IsChecked="{Binding RotX}"
|
||||||
|
Style="{StaticResource ToolBar_ToggleButton}"/>
|
||||||
|
<RadioButton Content="Y"
|
||||||
|
GroupName="Axes"
|
||||||
|
IsChecked="{Binding RotY}"
|
||||||
|
Style="{StaticResource ToolBar_ToggleButton}"/>
|
||||||
|
<RadioButton Content="Z"
|
||||||
|
GroupName="Axes"
|
||||||
|
IsChecked="{Binding RotZ}"
|
||||||
|
Style="{StaticResource ToolBar_ToggleButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<EgtWPFLib5:EgtTextBox2 Grid.Row="1"
|
||||||
|
Text="{Binding sRotAngle, UpdateSourceTrigger=Explicit}"
|
||||||
|
ResetValueOnLostFocus="False"
|
||||||
|
Margin="0,5,0,2.5"/>
|
||||||
|
<Grid Grid.Row="2"
|
||||||
|
Margin="0,2.5,0,0">
|
||||||
|
<Button Content="Drag"
|
||||||
|
Command="{Binding DragRotate_Command}"
|
||||||
|
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<!--Parameters Button-->
|
||||||
|
<ToggleButton Content="Parameters"
|
||||||
|
Grid.Row="9"
|
||||||
|
IsChecked="{Binding bMachParam_IsChecked}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource LeftPanel_Parameters_ToggleButton}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class FilledSolidPanelV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
<Grid x:Class="FilledSolidParamPanelV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:PrintApp="clr-namespace:Icarus"
|
||||||
|
Width="310"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Margin="0,0,0,2.5"
|
||||||
|
Style="{StaticResource Title_Border}">
|
||||||
|
<TextBlock Text="REDUCE SHELL NUMBER PARAMETERS"
|
||||||
|
Style="{StaticResource Title_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Row="1"
|
||||||
|
Padding="0,2.5,0,0"
|
||||||
|
Margin="0,2.5,0,0"
|
||||||
|
Style="{StaticResource BottomGrayRow_Border}">
|
||||||
|
<Grid Margin="2.5,2.5,2.5,0">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollViewer VerticalScrollBarVisibility="Auto"
|
||||||
|
HorizontalScrollBarVisibility="Disabled">
|
||||||
|
<ItemsControl ItemsSource="{Binding MachiningParamList}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<UniformGrid Columns="1"
|
||||||
|
HorizontalAlignment="Stretch"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.Resources>
|
||||||
|
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
|
||||||
|
<Grid Margin="0,1,2.5,1"
|
||||||
|
IsEnabled="{Binding bIsActive}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Text="{Binding sValue}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBox}"/>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
Content="R"
|
||||||
|
Command="{Binding ResetParam_Command}"
|
||||||
|
IsEnabled="{Binding bIsModifiedFromPart}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
Margin="2.5,0,0,0"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
|
||||||
|
<Grid Margin="0,1,2.5,1"
|
||||||
|
IsEnabled="{Binding bIsActive}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
<ComboBox Grid.Column="1"
|
||||||
|
ItemsSource="{Binding ValueList}"
|
||||||
|
SelectedItem="{Binding SelValue}"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
Content="R"
|
||||||
|
Command="{Binding ResetParam_Command}"
|
||||||
|
IsEnabled="{Binding bIsModifiedFromPart}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
Margin="2.5,0,0,0"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
|
||||||
|
<Grid Margin="0,1,2.5,1"
|
||||||
|
IsEnabled="{Binding bIsActive}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
<CheckBox Grid.Column="1"
|
||||||
|
IsChecked="{Binding bValue}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="2.5,0,0,0"/>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
Content="R"
|
||||||
|
Command="{Binding ResetParam_Command}"
|
||||||
|
IsEnabled="{Binding bIsModifiedFromPart}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
Margin="2.5,0,0,0"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.Resources>
|
||||||
|
</ItemsControl>
|
||||||
|
</ScrollViewer>
|
||||||
|
<UniformGrid Grid.Row="1"
|
||||||
|
Rows="1"
|
||||||
|
Margin="0,2.5,0,0">
|
||||||
|
<Button Command="{Binding Ok_Command}"
|
||||||
|
IsDefault="True"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding Cancel_Command}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Cancel.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</UniformGrid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class FilledSolidParamPanelV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,624 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class FilledSolidParamPanelVM
|
||||||
|
Inherits MachiningCathegory
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
Private m_cmdCancel As ICommand
|
||||||
|
|
||||||
|
#End Region ' FIELDS & PROPERTIES
|
||||||
|
|
||||||
|
#Region "CONSTRUCTORS"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in EgtCAM5Map
|
||||||
|
Map.SetRefFilledSolidParamPanelVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CONSTRUCTORS
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Friend Sub Init()
|
||||||
|
If IsNothing(Map.refFilledSolidPanelVM.SelFilledSolid) Then
|
||||||
|
' ripristino modalita' standard
|
||||||
|
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim nPartId As Integer = Map.refTopPanelVM.SelPart.nPartId
|
||||||
|
Dim nFilledSolidId As Integer = GDB_ID.NULL
|
||||||
|
Select Case Map.refFilledSolidPanelVM.SelFilledSolid.Type
|
||||||
|
Case RibEntity.RibTypes.FROMDRAW
|
||||||
|
nFilledSolidId = Map.refFilledSolidPanelVM.SelFilledSolid.nCurveId
|
||||||
|
Case RibEntity.RibTypes.FROMIMPORT
|
||||||
|
nFilledSolidId = Map.refFilledSolidPanelVM.SelFilledSolid.nExtrusionId
|
||||||
|
End Select
|
||||||
|
|
||||||
|
m_Type = Cathegories.AUX_SOLID
|
||||||
|
m_sName = "Filled Solid"
|
||||||
|
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidcheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId, Me),
|
||||||
|
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId, Me)})
|
||||||
|
NotifyPropertyChanged(NameOf(MachiningParamList))
|
||||||
|
NotifyPropertyChanged(NameOf(sName))
|
||||||
|
' verifico dipendenze tra parametri
|
||||||
|
Select Case m_Type
|
||||||
|
Case Cathegories.AUX_SOLID
|
||||||
|
For Each Param In {MachiningParam.Params.AUXSOLIDSINFILL}
|
||||||
|
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||||
|
MachiningParam.ManageDependencyParam()
|
||||||
|
Next
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub SaveCurrParams()
|
||||||
|
For Each Param In m_MachiningParamList
|
||||||
|
Param.SaveParam()
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub ResetCurrParams()
|
||||||
|
For Each Param In m_MachiningParamList
|
||||||
|
Param.ResetParam()
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub WriteParamsInFilledSolid(nRibId As Integer)
|
||||||
|
' se parametri modificati
|
||||||
|
Dim bModified As Boolean = False
|
||||||
|
For Each Param In m_MachiningParamList
|
||||||
|
Select Case Param.GetType()
|
||||||
|
Case GetType(FilledSolidNumericMachiningParam)
|
||||||
|
Dim NumericParam As FilledSolidNumericMachiningParam = TryCast(Param, FilledSolidNumericMachiningParam)
|
||||||
|
If NumericParam.bIsModified AndAlso Not bModified Then bModified = True
|
||||||
|
NumericParam.WriteParamInFilledSolid(nRibId)
|
||||||
|
Case GetType(FilledSolidComboMachiningParam)
|
||||||
|
Dim NumericParam As FilledSolidComboMachiningParam = TryCast(Param, FilledSolidComboMachiningParam)
|
||||||
|
If NumericParam.bIsModified AndAlso Not bModified Then bModified = True
|
||||||
|
NumericParam.WriteParamInFilledSolid(nRibId)
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
If bModified Then
|
||||||
|
' Imposto flag di ricalcolo slice
|
||||||
|
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||||
|
End If
|
||||||
|
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()
|
||||||
|
If Not IsNothing(Map.refFilledSolidPanelVM.SelFilledSolid) Then
|
||||||
|
' scrivo i parametri modificati
|
||||||
|
Select Case Map.refFilledSolidPanelVM.SelFilledSolid.Type
|
||||||
|
Case FilledSolidEntity.FilledSolidTypes.FROMDRAW
|
||||||
|
WriteParamsInFilledSolid(Map.refFilledSolidPanelVM.SelFilledSolid.nCurveId)
|
||||||
|
WriteParamsInFilledSolid(Map.refFilledSolidPanelVM.SelFilledSolid.nExtrusionId)
|
||||||
|
Case FilledSolidEntity.FilledSolidTypes.FROMIMPORT
|
||||||
|
WriteParamsInFilledSolid(Map.refFilledSolidPanelVM.SelFilledSolid.nExtrusionId)
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
' ripristino modalita' standard
|
||||||
|
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL)
|
||||||
|
Map.refFilledSolidPanelVM.ResetMachParamIsChecked()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Ok
|
||||||
|
|
||||||
|
#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()
|
||||||
|
' ripristino modalita' standard
|
||||||
|
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL)
|
||||||
|
Map.refFilledSolidPanelVM.ResetMachParamIsChecked()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Cancel
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class FilledSolidNumericMachiningParam
|
||||||
|
Inherits NumericMachiningParam
|
||||||
|
|
||||||
|
Public Overrides Property sValue As String
|
||||||
|
Get
|
||||||
|
Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If m_bIsLen Then
|
||||||
|
StringToLen(value, m_dValue)
|
||||||
|
Else
|
||||||
|
m_dValue = value
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(sValue))
|
||||||
|
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dPartValue As Double
|
||||||
|
Public ReadOnly Property dPartValue As Double
|
||||||
|
Get
|
||||||
|
Return m_dPartValue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property bIsModifiedFromPart As Boolean
|
||||||
|
Get
|
||||||
|
Return m_dValue <> m_dPartValue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdResetParam As ICommand
|
||||||
|
|
||||||
|
Sub New(Type As Params, nFilledSolidId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
|
||||||
|
MyBase.New(Type, Cathegory)
|
||||||
|
Dim bReadFromPart As Boolean = False
|
||||||
|
Select Case Type
|
||||||
|
Case Params.AUXSOLIDSSTRANDCOUNT
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSOVERLAP
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSLINKPARAM
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSLINKPARAM, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSOFFSETLEADPOINT
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSDENSITY
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSDENSITY, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSGRIDOVERLAP
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSDIRECTION
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSOFFSETX
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSOFFSETY
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSCOASTINGLEN
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSWIPELEN
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSWIPELEN, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSWIPELEN, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
Case Params.AUXSOLIDSWIPEDIR
|
||||||
|
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSWIPEDIR, m_dValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, m_dPartValue)
|
||||||
|
m_bIsLen = True
|
||||||
|
End Select
|
||||||
|
m_dOrigValue = m_dValue
|
||||||
|
If Not bReadFromPart Then
|
||||||
|
m_dValue = m_dPartValue
|
||||||
|
m_dOrigValue = m_dPartValue
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub WriteParamInFilledSolid(nFilledSolidId As Integer)
|
||||||
|
Dim sWriteValue As String = ""
|
||||||
|
If m_bIsLen Then
|
||||||
|
sWriteValue = LenToString(m_dValue, 2)
|
||||||
|
Else
|
||||||
|
sWriteValue = DoubleToString(m_dValue, 2)
|
||||||
|
End If
|
||||||
|
Select Case Type
|
||||||
|
Case Params.AUXSOLIDSSTRANDCOUNT
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSOVERLAP
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSLINKPARAM
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSLINKPARAM, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSLINKPARAM)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSOFFSETLEADPOINT
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSDENSITY
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSGRIDOVERLAP
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSDIRECTION
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSOFFSETX
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSOFFSETY
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSCOASTINGLEN
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSWIPELEN
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSWIPELEN, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSWIPELEN)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSWIPEDIR
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSWIPEDIR)
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub SaveParam()
|
||||||
|
m_dOrigValue = m_dValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub ResetParam()
|
||||||
|
m_dValue = m_dOrigValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "ResetParam"
|
||||||
|
|
||||||
|
Public ReadOnly Property ResetParam_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdResetParam Is Nothing Then
|
||||||
|
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdResetParam
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub ResetParamCmd()
|
||||||
|
m_dValue = m_dPartValue
|
||||||
|
NotifyPropertyChanged(NameOf(sValue))
|
||||||
|
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ResetParam
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class FilledSolidComboMachiningParam
|
||||||
|
Inherits ComboMachiningParam
|
||||||
|
|
||||||
|
Public Overrides Property SelValue As IdNameStruct
|
||||||
|
Get
|
||||||
|
Return m_SelValue
|
||||||
|
End Get
|
||||||
|
Set(value As IdNameStruct)
|
||||||
|
m_SelValue = value
|
||||||
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
|
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||||
|
ManageDependencyParam()
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected m_PartSelValue As IdNameStruct
|
||||||
|
Public ReadOnly Property PartSelValue As IdNameStruct
|
||||||
|
Get
|
||||||
|
Return m_PartSelValue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property bIsModifiedFromPart As Boolean
|
||||||
|
Get
|
||||||
|
Return m_SelValue.Id <> m_PartSelValue.Id
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdResetParam As ICommand
|
||||||
|
|
||||||
|
Sub New(Type As Params, nRibId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
|
||||||
|
MyBase.New(Type, Cathegory)
|
||||||
|
Dim bReadFromRib As Boolean = False
|
||||||
|
Dim bReadFromPart As Boolean = False
|
||||||
|
Select Case Type
|
||||||
|
Case Params.AUXSOLIDSINFILL
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
|
||||||
|
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
|
||||||
|
Dim nSelValue As Integer = 1
|
||||||
|
bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSINFILL, nSelValue)
|
||||||
|
If bReadFromRib Then
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
End If
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue)
|
||||||
|
m_PartSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
Case Params.AUXSOLIDSSTRANDORDER
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"),
|
||||||
|
New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")})
|
||||||
|
Dim nSelValue As Integer = 1
|
||||||
|
bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSSTRANDORDER, nSelValue)
|
||||||
|
If bReadFromRib Then
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
End If
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDORDER, nSelValue)
|
||||||
|
m_PartSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
Case Params.AUXSOLIDSLINKTYPE
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"),
|
||||||
|
New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"),
|
||||||
|
New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")})
|
||||||
|
Dim nSelValue As Integer = 1
|
||||||
|
bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSLINKTYPE, nSelValue)
|
||||||
|
If bReadFromRib Then
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
End If
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, nSelValue)
|
||||||
|
m_PartSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
End Select
|
||||||
|
m_OrigSelValue = m_SelValue
|
||||||
|
If Not bReadFromRib Then
|
||||||
|
If bReadFromPart Then
|
||||||
|
m_SelValue = m_PartSelValue
|
||||||
|
m_OrigSelValue = m_PartSelValue
|
||||||
|
Else
|
||||||
|
Select Case Type
|
||||||
|
Case Params.AUXSOLIDSINFILL
|
||||||
|
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL_TYPE.NONE)
|
||||||
|
m_SelValue = m_OrigSelValue
|
||||||
|
Case Params.AUXSOLIDSSTRANDORDER
|
||||||
|
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_STRANDORDERS.OUTTOIN)
|
||||||
|
m_SelValue = m_OrigSelValue
|
||||||
|
Case Params.AUXSOLIDSLINKTYPE
|
||||||
|
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_LINKTYPES.NONE)
|
||||||
|
m_SelValue = m_OrigSelValue
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub WriteParamInFilledSolid(nRibId As Integer)
|
||||||
|
Select Case Type
|
||||||
|
Case Params.AUXSOLIDSINFILL
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nRibId, MAC_AUXSOLIDSINFILL, m_SelValue.Id)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nRibId, MAC_AUXSOLIDSINFILL)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSSTRANDORDER
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nRibId, MAC_AUXSOLIDSSTRANDORDER, m_SelValue.Id)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nRibId, MAC_AUXSOLIDSSTRANDORDER)
|
||||||
|
End If
|
||||||
|
Case Params.AUXSOLIDSLINKTYPE
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nRibId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nRibId, MAC_AUXSOLIDSLINKTYPE)
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub SaveParam()
|
||||||
|
m_OrigSelValue = m_SelValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub ResetParam()
|
||||||
|
m_SelValue = m_OrigSelValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "ResetParam"
|
||||||
|
|
||||||
|
Public ReadOnly Property ResetParam_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdResetParam Is Nothing Then
|
||||||
|
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdResetParam
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub ResetParamCmd()
|
||||||
|
m_SelValue = m_PartSelValue
|
||||||
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
|
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ResetParam
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class FilledSolidCheckMachiningParam
|
||||||
|
Inherits CheckMachiningParam
|
||||||
|
|
||||||
|
Public Overrides Property bValue As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bValue
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bValue = value
|
||||||
|
NotifyPropertyChanged(NameOf(bValue))
|
||||||
|
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected m_bPartValue As Boolean
|
||||||
|
Public ReadOnly Property bPartValue As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bPartValue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property bIsModifiedFromPart As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bValue <> m_bPartValue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdResetParam As ICommand
|
||||||
|
|
||||||
|
Sub New(Type As Params, nAuxSolidId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
|
||||||
|
MyBase.New(Type, Cathegory)
|
||||||
|
Dim bReadFromPart As Boolean = False
|
||||||
|
Select Case Type
|
||||||
|
Case Params.AUXSOLIDSINFILLLINK
|
||||||
|
bReadFromPart = EgtGetInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK, m_bValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, m_bPartValue)
|
||||||
|
End Select
|
||||||
|
m_bOrigValue = m_bValue
|
||||||
|
If Not bReadFromPart Then
|
||||||
|
m_bValue = m_bPartValue
|
||||||
|
m_bOrigValue = m_bPartValue
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub WriteParamInRib(nAuxSolidId As Integer)
|
||||||
|
Select Case Type
|
||||||
|
Case Params.AUXSOLIDSINFILLLINK
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0))
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK)
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub SaveParam()
|
||||||
|
m_bOrigValue = m_bValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub ResetParam()
|
||||||
|
m_bValue = m_bOrigValue
|
||||||
|
NotifyPropertyChanged(NameOf(bValue))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "ResetParam"
|
||||||
|
|
||||||
|
Public ReadOnly Property ResetParam_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdResetParam Is Nothing Then
|
||||||
|
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdResetParam
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub ResetParamCmd()
|
||||||
|
m_bValue = m_bPartValue
|
||||||
|
NotifyPropertyChanged(NameOf(bValue))
|
||||||
|
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ResetParam
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -53,6 +53,28 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>Icarus.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'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\Release\</OutputPath>
|
||||||
|
<DocumentationFile>Icarus.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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="EgtUILib, Version=2.4.7.1, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="EgtUILib, Version=2.4.7.1, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
@@ -65,6 +87,10 @@
|
|||||||
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
|
<HintPath>..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="PresentationFramework.Aero2" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
@@ -90,20 +116,18 @@
|
|||||||
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
|
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
|
||||||
<DependentUpon>AboutBoxV.xaml</DependentUpon>
|
<DependentUpon>AboutBoxV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="AttachedProperties\TreeViewItemHelper.vb" />
|
||||||
<Compile Include="ChooseMachineWnd\ChooseMachineWndV.xaml.vb">
|
<Compile Include="ChooseMachineWnd\ChooseMachineWndV.xaml.vb">
|
||||||
<DependentUpon>ChooseMachineWndV.xaml</DependentUpon>
|
<DependentUpon>ChooseMachineWndV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ChooseMachineWnd\ChooseMachineWndVM.vb" />
|
<Compile Include="ChooseMachineWnd\ChooseMachineWndVM.vb" />
|
||||||
<Compile Include="ChooseReferenceWnd\ChooseReferenceWndV.xaml.vb">
|
|
||||||
<DependentUpon>ChooseReferenceWndV.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="ChooseReferenceWnd\ChooseReferenceWndVM.vb" />
|
|
||||||
<Compile Include="Constants\Const3dPrint.vb" />
|
<Compile Include="Constants\Const3dPrint.vb" />
|
||||||
<Compile Include="Constants\ConstBeam.vb" />
|
<Compile Include="Constants\ConstBeam.vb" />
|
||||||
<Compile Include="Constants\ConstColumns.vb" />
|
<Compile Include="Constants\ConstColumns.vb" />
|
||||||
<Compile Include="Constants\ConstDataGridColumnsIni.vb" />
|
<Compile Include="Constants\ConstDataGridColumnsIni.vb" />
|
||||||
<Compile Include="Constants\ConstDims.vb" />
|
<Compile Include="Constants\ConstDims.vb" />
|
||||||
<Compile Include="Constants\ConstGen.vb" />
|
<Compile Include="Constants\ConstGen.vb" />
|
||||||
|
<Compile Include="Constants\ConstMachDataIni.vb" />
|
||||||
<Compile Include="Constants\ConstIni.vb" />
|
<Compile Include="Constants\ConstIni.vb" />
|
||||||
<Compile Include="Constants\ConstMachComm.vb" />
|
<Compile Include="Constants\ConstMachComm.vb" />
|
||||||
<Compile Include="Constants\ConstMachIni.vb" />
|
<Compile Include="Constants\ConstMachIni.vb" />
|
||||||
@@ -116,6 +140,12 @@
|
|||||||
<DependentUpon>CurrLayerSliderV.xaml</DependentUpon>
|
<DependentUpon>CurrLayerSliderV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="CurrLayerSlider\CurrLayerSliderVM.vb" />
|
<Compile Include="CurrLayerSlider\CurrLayerSliderVM.vb" />
|
||||||
|
<Compile Include="CustomControls\CheckedImageRadioButton.xaml.vb">
|
||||||
|
<DependentUpon>CheckedImageRadioButton.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomControls\CheckedImageToggleButton.xaml.vb">
|
||||||
|
<DependentUpon>CheckedImageToggleButton.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" />
|
<Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" />
|
||||||
<Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" />
|
<Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" />
|
||||||
<Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" />
|
<Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" />
|
||||||
@@ -123,11 +153,22 @@
|
|||||||
<DependentUpon>DispositionPanelV.xaml</DependentUpon>
|
<DependentUpon>DispositionPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="DispositionPanel\DispositionPanelVM.vb" />
|
<Compile Include="DispositionPanel\DispositionPanelVM.vb" />
|
||||||
<Compile Include="ImportPanel\ImportPanelV.xaml.vb">
|
<Compile Include="FilledSolidPanel\FilledSolidPanelV.xaml.vb">
|
||||||
<DependentUpon>ImportPanelV.xaml</DependentUpon>
|
<DependentUpon>FilledSolidPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ImportPanel\ImportPanelVM.vb" />
|
<Compile Include="FilledSolidPanel\FilledSolidPanelVM.vb" />
|
||||||
<Compile Include="ImportPanel\ImportUtility.vb" />
|
<Compile Include="FilledSolidParamPanel\FilledSolidParamPanelV.xaml.vb">
|
||||||
|
<DependentUpon>FilledSolidParamPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="FilledSolidParamPanel\FilledSolidParamPanelVM.vb" />
|
||||||
|
<Compile Include="ImportExportMachiningPanel\ImportExportMachiningPanelV.xaml.vb">
|
||||||
|
<DependentUpon>ImportExportMachiningPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ImportExportMachiningPanel\ImportExportMachiningPanelVM.vb" />
|
||||||
|
<Compile Include="ImportLoadingWnd\ImportLoadingWndV.xaml.vb">
|
||||||
|
<DependentUpon>ImportLoadingWndV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ImportLoadingWnd\ImportLoadingWndVM.vb" />
|
||||||
<Compile Include="InstrumentPanel\InstrumentPanelV.xaml.vb">
|
<Compile Include="InstrumentPanel\InstrumentPanelV.xaml.vb">
|
||||||
<DependentUpon>InstrumentPanelV.xaml</DependentUpon>
|
<DependentUpon>InstrumentPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -140,6 +181,10 @@
|
|||||||
<DependentUpon>MachinePanelV.xaml</DependentUpon>
|
<DependentUpon>MachinePanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MachinePanel\MachinePanelVM.vb" />
|
<Compile Include="MachinePanel\MachinePanelVM.vb" />
|
||||||
|
<Compile Include="MachineViewPanel\MachineViewPanelV.xaml.vb">
|
||||||
|
<DependentUpon>MachineViewPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MachineViewPanel\MachineViewPanelVM.vb" />
|
||||||
<Compile Include="MachiningDb\MachiningDbV.xaml.vb">
|
<Compile Include="MachiningDb\MachiningDbV.xaml.vb">
|
||||||
<DependentUpon>MachiningDbV.xaml</DependentUpon>
|
<DependentUpon>MachiningDbV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -154,18 +199,21 @@
|
|||||||
<DependentUpon>MachSaveInDbWindowV.xaml</DependentUpon>
|
<DependentUpon>MachSaveInDbWindowV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MachSaveInDbWnd\MachSaveInDbWndVM.vb" />
|
<Compile Include="MachSaveInDbWnd\MachSaveInDbWndVM.vb" />
|
||||||
|
<Compile Include="ManagePartPanel\ManagePartPanelV.xaml.vb">
|
||||||
|
<DependentUpon>ManagePartPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ManagePartPanel\ManagePartPanelVM.vb" />
|
||||||
|
<Compile Include="ManagePartPanel\ManagePartUtility.vb" />
|
||||||
<Compile Include="MaterialDb\Material.vb" />
|
<Compile Include="MaterialDb\Material.vb" />
|
||||||
<Compile Include="MaterialDb\MaterialDbV.xaml.vb">
|
<Compile Include="MaterialDb\MaterialDbV.xaml.vb">
|
||||||
<DependentUpon>MaterialDbV.xaml</DependentUpon>
|
<DependentUpon>MaterialDbV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MaterialDb\MaterialDbVM.vb" />
|
<Compile Include="MaterialDb\MaterialDbVM.vb" />
|
||||||
<Compile Include="ModifyPartPanel\ModifyPartPanelV.xaml.vb">
|
<Compile Include="TSFEditor\ColumnHeader.xaml.vb">
|
||||||
<DependentUpon>ModifyPartPanelV.xaml</DependentUpon>
|
<DependentUpon>ColumnHeader.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ModifyPartPanel\ModifyPartPanelVM.vb" />
|
<Compile Include="UpdateMachine\UpdateMachineV.xaml.vb">
|
||||||
<Compile Include="ModifyPartPanel\ModifyPartUtility.vb" />
|
<DependentUpon>UpdateMachineV.xaml</DependentUpon>
|
||||||
<Compile Include="OptionsWindow\MachineBox.xaml.vb">
|
|
||||||
<DependentUpon>MachineBox.xaml</DependentUpon>
|
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="OptionsWindow\OptionModule.vb" />
|
<Compile Include="OptionsWindow\OptionModule.vb" />
|
||||||
<Compile Include="OptionsWindow\OptionWindowV.xaml.vb">
|
<Compile Include="OptionsWindow\OptionWindowV.xaml.vb">
|
||||||
@@ -188,6 +236,10 @@
|
|||||||
<DependentUpon>RibPanelV.xaml</DependentUpon>
|
<DependentUpon>RibPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="RibPanel\RibPanelVM.vb" />
|
<Compile Include="RibPanel\RibPanelVM.vb" />
|
||||||
|
<Compile Include="RibParamPanel\CopyFromWndV.xaml.vb">
|
||||||
|
<DependentUpon>CopyFromWndV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RibParamPanel\CopyFromWndVM.vb" />
|
||||||
<Compile Include="RibParamPanel\RibParamPanelV.xaml.vb">
|
<Compile Include="RibParamPanel\RibParamPanelV.xaml.vb">
|
||||||
<DependentUpon>RibParamPanelV.xaml</DependentUpon>
|
<DependentUpon>RibParamPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -215,6 +267,7 @@
|
|||||||
<Compile Include="ShowPanel\ShowPanelV.xaml.vb">
|
<Compile Include="ShowPanel\ShowPanelV.xaml.vb">
|
||||||
<DependentUpon>ShowPanelV.xaml</DependentUpon>
|
<DependentUpon>ShowPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="ShowPanel\ShowPanelVM.vb" />
|
||||||
<Compile Include="ShowValueSlider\ShowValueSlider.xaml.vb">
|
<Compile Include="ShowValueSlider\ShowValueSlider.xaml.vb">
|
||||||
<DependentUpon>ShowValueSlider.xaml</DependentUpon>
|
<DependentUpon>ShowValueSlider.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -240,10 +293,16 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Special-3dPrinting\Printing3DPanelVM.vb" />
|
<Compile Include="Special-3dPrinting\Printing3DPanelVM.vb" />
|
||||||
<Compile Include="Special-3dPrinting\Printing3DUtility.vb" />
|
<Compile Include="Special-3dPrinting\Printing3DUtility.vb" />
|
||||||
|
<Compile Include="SplashScreen\SplashScreen.xaml.vb">
|
||||||
|
<DependentUpon>SplashScreen.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="StartMachPanel\StartMachPanelV.xaml.vb">
|
<Compile Include="StartMachPanel\StartMachPanelV.xaml.vb">
|
||||||
<DependentUpon>StartMachPanelV.xaml</DependentUpon>
|
<DependentUpon>StartMachPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="StartMachPanel\StartMachPanelVM.vb" />
|
<Compile Include="StartMachPanel\StartMachPanelVM.vb" />
|
||||||
|
<Compile Include="StatusBar\MessagePanelV.xaml.vb">
|
||||||
|
<DependentUpon>MessagePanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="StatusBar\MyStatusBarVM.vb" />
|
<Compile Include="StatusBar\MyStatusBarVM.vb" />
|
||||||
<Compile Include="StatusBar\StatusBarV.xaml.vb">
|
<Compile Include="StatusBar\StatusBarV.xaml.vb">
|
||||||
<DependentUpon>StatusBarV.xaml</DependentUpon>
|
<DependentUpon>StatusBarV.xaml</DependentUpon>
|
||||||
@@ -256,6 +315,7 @@
|
|||||||
<Compile Include="TSFEditor\TFSEditorV.xaml.vb">
|
<Compile Include="TSFEditor\TFSEditorV.xaml.vb">
|
||||||
<DependentUpon>TFSEditorV.xaml</DependentUpon>
|
<DependentUpon>TFSEditorV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="UpdateMachine\UpdateMachineVM.vb" />
|
||||||
<Compile Include="Utility\CurrentMachine.vb" />
|
<Compile Include="Utility\CurrentMachine.vb" />
|
||||||
<Compile Include="Utility\Dictionary.xaml.vb">
|
<Compile Include="Utility\Dictionary.xaml.vb">
|
||||||
<DependentUpon>Dictionary.xaml</DependentUpon>
|
<DependentUpon>Dictionary.xaml</DependentUpon>
|
||||||
@@ -263,6 +323,7 @@
|
|||||||
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
||||||
<Compile Include="Utility\EgwCrypto.vb" />
|
<Compile Include="Utility\EgwCrypto.vb" />
|
||||||
<Compile Include="Utility\GeomEntityColors.vb" />
|
<Compile Include="Utility\GeomEntityColors.vb" />
|
||||||
|
<Compile Include="Utility\JsonUtility.vb" />
|
||||||
<Compile Include="Utility\LuaExec.vb" />
|
<Compile Include="Utility\LuaExec.vb" />
|
||||||
<Compile Include="Utility\Map.vb" />
|
<Compile Include="Utility\Map.vb" />
|
||||||
<Compile Include="Utility\MyMachine.vb" />
|
<Compile Include="Utility\MyMachine.vb" />
|
||||||
@@ -285,10 +346,6 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="ChooseReferenceWnd\ChooseReferenceWndV.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="ControllerInputPanel\ControllerInputPanelV.xaml">
|
<Page Include="ControllerInputPanel\ControllerInputPanelV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -297,11 +354,31 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="CustomControls\CheckedImageRadioButton.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="CustomControls\CheckedImageToggleButton.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="DispositionPanel\DispositionPanelV.xaml">
|
<Page Include="DispositionPanel\DispositionPanelV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="ImportPanel\ImportPanelV.xaml">
|
<Page Include="FilledSolidPanel\FilledSolidPanelV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="FilledSolidParamPanel\FilledSolidParamPanelV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="ImportExportMachiningPanel\ImportExportMachiningPanelV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="ImportLoadingWnd\ImportLoadingWndV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
@@ -317,6 +394,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="MachineViewPanel\MachineViewPanelV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="MachiningDb\MachiningDbV.xaml">
|
<Page Include="MachiningDb\MachiningDbV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -345,15 +426,19 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="ManagePartPanel\ManagePartPanelV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Include="MaterialDb\MaterialDbV.xaml">
|
<Page Include="MaterialDb\MaterialDbV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="ModifyPartPanel\ModifyPartPanelV.xaml">
|
<Page Include="TSFEditor\ColumnHeader.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="OptionsWindow\MachineBox.xaml">
|
<Page Include="UpdateMachine\UpdateMachineV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
@@ -377,6 +462,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="RibParamPanel\CopyFromWndV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="RibParamPanel\RibParamPanelV.xaml">
|
<Page Include="RibParamPanel\RibParamPanelV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -429,10 +518,18 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="SplashScreen\SplashScreen.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="StartMachPanel\StartMachPanelV.xaml">
|
<Page Include="StartMachPanel\StartMachPanelV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="StatusBar\MessagePanelV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="StatusBar\StatusBarV.xaml">
|
<Page Include="StatusBar\StatusBarV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -522,16 +619,12 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\ProjectManager\ExportProject.png" />
|
<Resource Include="Resources\ProjectManager\ExportProject.png" />
|
||||||
<Resource Include="Resources\ProjectManager\GoToProd.png" />
|
|
||||||
<Resource Include="Resources\ProjectManager\GoToProj.png" />
|
|
||||||
<Resource Include="Resources\ProjectManager\ImportBTL.png" />
|
|
||||||
<Resource Include="Resources\ProjectManager\ImportProject.png" />
|
<Resource Include="Resources\ProjectManager\ImportProject.png" />
|
||||||
<Resource Include="Resources\ProjectManager\New.png" />
|
<Resource Include="Resources\ProjectManager\New.png" />
|
||||||
<Resource Include="Resources\ProjectManager\Open.png" />
|
<Resource Include="Resources\ProjectManager\Open.png" />
|
||||||
<Resource Include="Resources\ProjectManager\Options.png" />
|
<Resource Include="Resources\ProjectManager\Options.png" />
|
||||||
<Resource Include="Resources\ProjectManager\Save.png" />
|
<Resource Include="Resources\ProjectManager\Save.png" />
|
||||||
<Resource Include="Resources\ProjectManager\SaveAs.png" />
|
<Resource Include="Resources\ProjectManager\SaveAs.png" />
|
||||||
<Resource Include="Resources\ProjectManager\UpdateBTL.png" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\ProjectManager\Import.png" />
|
<Resource Include="Resources\ProjectManager\Import.png" />
|
||||||
@@ -543,16 +636,11 @@
|
|||||||
<Resource Include="Resources\ViewPanel\LookFromBACK.png" />
|
<Resource Include="Resources\ViewPanel\LookFromBACK.png" />
|
||||||
<Resource Include="Resources\ViewPanel\LookFromBOTTOM.png" />
|
<Resource Include="Resources\ViewPanel\LookFromBOTTOM.png" />
|
||||||
<Resource Include="Resources\ViewPanel\LookFromFRONT.png" />
|
<Resource Include="Resources\ViewPanel\LookFromFRONT.png" />
|
||||||
<Resource Include="Resources\ViewPanel\LookFromISO_NE.png" />
|
|
||||||
<Resource Include="Resources\ViewPanel\LookFromISO_NW.png" />
|
|
||||||
<Resource Include="Resources\ViewPanel\LookFromISO_SE.png" />
|
|
||||||
<Resource Include="Resources\ViewPanel\LookFromISO_SW.png" />
|
<Resource Include="Resources\ViewPanel\LookFromISO_SW.png" />
|
||||||
<Resource Include="Resources\ViewPanel\LookFromLEFT.png" />
|
<Resource Include="Resources\ViewPanel\LookFromLEFT.png" />
|
||||||
<Resource Include="Resources\ViewPanel\LookFromRIGHT.png" />
|
<Resource Include="Resources\ViewPanel\LookFromRIGHT.png" />
|
||||||
<Resource Include="Resources\ViewPanel\LookFromTOP.png" />
|
<Resource Include="Resources\ViewPanel\LookFromTOP.png" />
|
||||||
<Resource Include="Resources\ViewPanel\ZoomAll.png" />
|
<Resource Include="Resources\ViewPanel\ZoomAll.png" />
|
||||||
<Resource Include="Resources\ViewPanel\ZoomIn.png" />
|
|
||||||
<Resource Include="Resources\ViewPanel\ZoomOut.png" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\ShowPanel\CurveDir.png" />
|
<Resource Include="Resources\ShowPanel\CurveDir.png" />
|
||||||
@@ -561,10 +649,7 @@
|
|||||||
<Resource Include="Resources\ShowPanel\RenderingWF.png" />
|
<Resource Include="Resources\ShowPanel\RenderingWF.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\InstrumentPanel\Analyze.png" />
|
|
||||||
<Resource Include="Resources\InstrumentPanel\ChangeParam.png" />
|
|
||||||
<Resource Include="Resources\InstrumentPanel\GetDist.png" />
|
<Resource Include="Resources\InstrumentPanel\GetDist.png" />
|
||||||
<Resource Include="Resources\InstrumentPanel\Statistics.png" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\TreeView\Folder.png" />
|
<Resource Include="Resources\TreeView\Folder.png" />
|
||||||
@@ -576,7 +661,6 @@
|
|||||||
<Resource Include="Resources\DrawPanel\Line2P.png" />
|
<Resource Include="Resources\DrawPanel\Line2P.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\GridViewPanel\Cplane3POINTS.png" />
|
|
||||||
<Resource Include="Resources\GridViewPanel\CplaneBACK.png" />
|
<Resource Include="Resources\GridViewPanel\CplaneBACK.png" />
|
||||||
<Resource Include="Resources\GridViewPanel\CplaneBOTTOM.png" />
|
<Resource Include="Resources\GridViewPanel\CplaneBOTTOM.png" />
|
||||||
<Resource Include="Resources\GridViewPanel\CplaneELEVATION.png" />
|
<Resource Include="Resources\GridViewPanel\CplaneELEVATION.png" />
|
||||||
@@ -584,11 +668,8 @@
|
|||||||
<Resource Include="Resources\GridViewPanel\CplaneLEFT.png" />
|
<Resource Include="Resources\GridViewPanel\CplaneLEFT.png" />
|
||||||
<Resource Include="Resources\GridViewPanel\CplaneOBJECT.png" />
|
<Resource Include="Resources\GridViewPanel\CplaneOBJECT.png" />
|
||||||
<Resource Include="Resources\GridViewPanel\CplaneORIGIN.png" />
|
<Resource Include="Resources\GridViewPanel\CplaneORIGIN.png" />
|
||||||
<Resource Include="Resources\GridViewPanel\CplanePERPCURVE.png" />
|
|
||||||
<Resource Include="Resources\GridViewPanel\CplaneRIGHT.png" />
|
<Resource Include="Resources\GridViewPanel\CplaneRIGHT.png" />
|
||||||
<Resource Include="Resources\GridViewPanel\CplaneROTATE.png" />
|
|
||||||
<Resource Include="Resources\GridViewPanel\CplaneTOP.png" />
|
<Resource Include="Resources\GridViewPanel\CplaneTOP.png" />
|
||||||
<Resource Include="Resources\GridViewPanel\CplaneView.png" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\DrawPanel\Delete.png" />
|
<Resource Include="Resources\DrawPanel\Delete.png" />
|
||||||
@@ -633,10 +714,156 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\TopPanel\Edit.png" />
|
<Resource Include="Resources\TopPanel\Edit.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SplashScreen\GoldSplashscreen.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SplashScreen\LogoEgalware.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\TopPanel\ManagePart.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\TopPanel\MaterialDb.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\TopPanel\MachiningDb.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\StatusBar\GridVisibility.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\InstrumentPanel\EdgeAnalysis.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ViewPanel\CplaneView.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\StatusBar\GridVisibilityWhite.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\MachiningDb\MachiningExport.png" />
|
||||||
|
<Resource Include="Resources\MachiningDb\MachiningImport.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\TFSEditor\Expand.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SliderManager\FromSelected.png" />
|
||||||
|
<Resource Include="Resources\SliderManager\OnlySelected.png" />
|
||||||
|
<Resource Include="Resources\SliderManager\UntilSelected.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ProjectManager\Export.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ShowPanel\CurveDir_White.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ShowPanel\RenderingHL_White.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ShowPanel\RenderingSH_White.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ShowPanel\RenderingWF_White.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\InstrumentPanel\EdgeAnalysis_White.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\InstrumentPanel\GetDist_White.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\MachiningDb\Edit.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\TopPanel\Offset.png" />
|
||||||
|
<Resource Include="Resources\TopPanel\SlicingDirection.png" />
|
||||||
|
<Resource Include="Resources\TopPanel\StrandCount.png" />
|
||||||
|
<Resource Include="Resources\TopPanel\StrandH.png" />
|
||||||
|
<Resource Include="Resources\TopPanel\StrandW.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Common\Cancel.png" />
|
||||||
|
<Resource Include="Resources\Common\Ok.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SimulationPanel\HeadMode.png" />
|
||||||
|
<Resource Include="Resources\SimulationPanel\MachMode.png" />
|
||||||
|
<Resource Include="Resources\SimulationPanel\ToolMode.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\AboutBox\EgalwareLogo.png" />
|
||||||
|
<Resource Include="Resources\AboutBox\IcarusLogo.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\CurrMachining\SaveInDb.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\MaterialDb\Edit.png" />
|
||||||
|
<Resource Include="Resources\MaterialDb\MaterialExport.png" />
|
||||||
|
<Resource Include="Resources\MaterialDb\MaterialImport.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ViewPanel\LookFromISO_SE.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Common\Close.png" />
|
||||||
|
<Resource Include="Resources\Common\Maximize.png" />
|
||||||
|
<Resource Include="Resources\Common\Minimize.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Common\Restore.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SliceManager\StopCalculation.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SplashScreen\BlueSplashscreen.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SliceManager\Dimensions.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\TFSEditor\Reduce.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ReferencePanel\BC.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\BL.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\BR.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\MC.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\ML.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\MR.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\TC.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\TL.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\TR.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\ReferencePanel\White_BC.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\White_BL.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\White_BR.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\White_MC.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\White_ML.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\White_MR.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\White_TC.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\White_TL.png" />
|
||||||
|
<Resource Include="Resources\ReferencePanel\White_TR.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SliceManager\Mass.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\SliceManager\Time.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\RibParamPanel\CopyFrom.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR64.exe
|
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
|
||||||
|
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Icarus\IcarusD32.exe
|
||||||
|
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR64.exe
|
||||||
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Icarus\IcarusD64.exe</PostBuildEvent>
|
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\Icarus\IcarusD64.exe</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<EgtWPFLib5:EgtMainWindow x:Class="ImportExportMachiningPanelV"
|
||||||
|
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 OkMsg}"
|
||||||
|
SizeToContent="WidthAndHeight"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
Style="{StaticResource Dialog_Window}">
|
||||||
|
|
||||||
|
<Grid Margin="2.5,2.5,2.5,0">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ListBox ItemsSource="{Binding MachiningList}"
|
||||||
|
Height="400"
|
||||||
|
Width="250">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningItem}">
|
||||||
|
<Grid Height="20">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<CheckBox Name="ActiveTxBx"
|
||||||
|
Grid.Column="0"
|
||||||
|
IsChecked="{Binding Active}"
|
||||||
|
Height="15"
|
||||||
|
Width="15"
|
||||||
|
Margin="0,0,5,0"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Visibility="{Binding Path=DataContext.Active_Visibility,
|
||||||
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Text="{Binding sName}"
|
||||||
|
FontSize="15"
|
||||||
|
Margin="0,0,5,0"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
<Ellipse Grid.Column="2"
|
||||||
|
Width="15"
|
||||||
|
Height="15"
|
||||||
|
Fill="DarkOrange"
|
||||||
|
Visibility="{Binding Overwrite_Visibility}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
<UniformGrid Grid.Row="2"
|
||||||
|
Rows="1"
|
||||||
|
Margin="0,20,0,0">
|
||||||
|
<Button Command="{Binding OkCommand}"
|
||||||
|
IsEnabled="{Binding IsEnabledOkBtn, Mode=OneWay}"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button IsCancel="True"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Cancel.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
Public Class ImportExportMachiningPanelV
|
||||||
|
|
||||||
|
Private WithEvents m_ImportExportMachiningPanelVM As ImportExportMachiningPanelVM
|
||||||
|
|
||||||
|
Sub New(Owner As Window, ImportExportMachiningPanelVM As ImportExportMachiningPanelVM)
|
||||||
|
MyBase.New(Owner)
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = ImportExportMachiningPanelVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_ImportExportMachiningPanelVM = ImportExportMachiningPanelVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ImportExportMachiningPanelVM.m_CloseWindow
|
||||||
|
Me.DialogResult = bDialogResult
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,681 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.Drawing
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports Icarus.ImportExportMachiningPanelVM
|
||||||
|
|
||||||
|
Public Class ImportExportMachiningPanelVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private Const m_MaterialDataExtension As String = ".mtd"
|
||||||
|
Public Shared ReadOnly Property MaterialDataExtension As String
|
||||||
|
Get
|
||||||
|
Return m_MaterialDataExtension
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private Const m_OriginalMaterialDataExtension As String = ".omtd"
|
||||||
|
Public Shared ReadOnly Property OriginalMaterialDataExtension As String
|
||||||
|
Get
|
||||||
|
Return m_OriginalMaterialDataExtension
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private Const m_MachiningDataExtension As String = ".mcd"
|
||||||
|
Public Shared ReadOnly Property MachiningDataExtension As String
|
||||||
|
Get
|
||||||
|
Return m_MachiningDataExtension
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Modalita' di apertura della finestra
|
||||||
|
Public Enum WindowModeEnum As Integer
|
||||||
|
IMPORT = 1
|
||||||
|
EXPORT = 2
|
||||||
|
IMPORT_ORIG = 3
|
||||||
|
EXPORT_ORIG = 4
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' Tipo da importare/esportare
|
||||||
|
Public Enum WindowTypeEnum As Integer
|
||||||
|
MATERIAL = 1
|
||||||
|
MACHINING = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_WindowMode As WindowModeEnum
|
||||||
|
Public ReadOnly Property WindowMode As WindowModeEnum
|
||||||
|
Get
|
||||||
|
Return m_WindowMode
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_WindowType As WindowTypeEnum
|
||||||
|
Public ReadOnly Property WindowType As WindowTypeEnum
|
||||||
|
Get
|
||||||
|
Return m_WindowType
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Lista delle lavorazioni
|
||||||
|
Private m_MachiningList As New ObservableCollection(Of ImpExpMachiningItem)
|
||||||
|
Public Property MachiningList As ObservableCollection(Of ImpExpMachiningItem)
|
||||||
|
Get
|
||||||
|
Return m_MachiningList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of ImpExpMachiningItem))
|
||||||
|
m_MachiningList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Percorso del file da cui importare le lavorazioni
|
||||||
|
Private m_ImportFilePath As String
|
||||||
|
Public ReadOnly Property ImportFilePath As String
|
||||||
|
Get
|
||||||
|
Return m_ImportFilePath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Lista delle lavorazioni presenti nel file da cui importare
|
||||||
|
Private m_ImportFileMachiningNameList As String()
|
||||||
|
Public ReadOnly Property ImportFileMachiningNameList As String()
|
||||||
|
Get
|
||||||
|
Return m_ImportFileMachiningNameList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Lista delle lavorazioni importate con successo
|
||||||
|
Private m_vsImported As String()
|
||||||
|
Public ReadOnly Property vsImported As String()
|
||||||
|
Get
|
||||||
|
Return m_vsImported
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property IsEnabledOkBtn As Boolean
|
||||||
|
Get
|
||||||
|
For Each Machining In MachiningList
|
||||||
|
If Machining.Active Then Return True
|
||||||
|
Next
|
||||||
|
Return False
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
|
||||||
|
#Region "MESSAGES"
|
||||||
|
|
||||||
|
Public ReadOnly Property OkMsg As String
|
||||||
|
Get
|
||||||
|
If WindowMode = WindowModeEnum.IMPORT Then
|
||||||
|
Return EgtMsg(31450)
|
||||||
|
Else
|
||||||
|
Return EgtMsg(31451)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Messages
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
' export
|
||||||
|
Sub New(Type As WindowTypeEnum, Mode As WindowModeEnum, Optional sImportFilePath As String = "")
|
||||||
|
m_WindowType = Type
|
||||||
|
ImpExpMachiningItem.SetWindowType(m_WindowType)
|
||||||
|
m_WindowMode = Mode
|
||||||
|
' carico lista lavorazioni
|
||||||
|
MachiningList.Clear()
|
||||||
|
Select Case Mode
|
||||||
|
Case WindowModeEnum.IMPORT
|
||||||
|
Select Case Type
|
||||||
|
Case WindowTypeEnum.MATERIAL
|
||||||
|
m_ImportFilePath = sImportFilePath
|
||||||
|
' carico lista lavorazioni
|
||||||
|
MachiningList.Clear()
|
||||||
|
' leggo ed aggiungo le altre
|
||||||
|
Dim nIndex As Integer = 1
|
||||||
|
Dim sGUID As String = ""
|
||||||
|
Dim sName As String = ""
|
||||||
|
Dim sMaterials As String = ""
|
||||||
|
Dim bIsOriginal = False
|
||||||
|
Dim bIsCustom = False
|
||||||
|
While ReadMachiningParamString(nIndex, MAT_GUID, "", sGUID, sImportFilePath) > 0
|
||||||
|
Dim Guid As Guid = Guid.Empty
|
||||||
|
Guid.TryParse(sGUID, Guid)
|
||||||
|
ReadMachiningParamString(nIndex, MAT_NAME, "", sName, sImportFilePath)
|
||||||
|
Dim sOrigGUID As String = ""
|
||||||
|
ReadMachiningParamString(nIndex, MAT_ORIG, "", sOrigGUID, sImportFilePath)
|
||||||
|
If sOrigGUID = ORIG_MATERIAL Then
|
||||||
|
If Not bIsOriginal Then bIsOriginal = True
|
||||||
|
Else
|
||||||
|
If Not bIsCustom Then bIsCustom = True
|
||||||
|
End If
|
||||||
|
MachiningList.Add(New ImpExpMachiningItem(nIndex, Guid, sName, AlreadyExist(sName)))
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
If bIsOriginal AndAlso bIsCustom Then
|
||||||
|
MessageBox.Show("Corrupted file! Impossible to import it!")
|
||||||
|
ElseIf bIsOriginal Then
|
||||||
|
LoadOriginalMaterial()
|
||||||
|
End If
|
||||||
|
Case WindowTypeEnum.MACHINING
|
||||||
|
m_ImportFilePath = sImportFilePath
|
||||||
|
' carico lista lavorazioni
|
||||||
|
MachiningList.Clear()
|
||||||
|
' leggo ed aggiungo le altre
|
||||||
|
Dim nIndex As Integer = 1
|
||||||
|
Dim sGUID As String = ""
|
||||||
|
Dim sName As String = ""
|
||||||
|
Dim sMaterials As String = ""
|
||||||
|
While ReadMachiningParamString(nIndex, MAC_GUID, "", sGUID, sImportFilePath) > 0
|
||||||
|
Dim Guid As Guid = Guid.Empty
|
||||||
|
Guid.TryParse(sGUID, Guid)
|
||||||
|
ReadMachiningParamString(nIndex, MAC_NAME, "", sName, sImportFilePath)
|
||||||
|
MachiningList.Add(New ImpExpMachiningItem(nIndex, Guid, sName, AlreadyExist(sName)))
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
End Select
|
||||||
|
Case WindowModeEnum.EXPORT
|
||||||
|
Select Case Type
|
||||||
|
Case WindowTypeEnum.MATERIAL
|
||||||
|
' leggo ed aggiungo le altre
|
||||||
|
Dim nIndex As Integer = 1
|
||||||
|
Dim sGUID As String = ""
|
||||||
|
Dim sName As String = ""
|
||||||
|
While ReadMaterialParamString(nIndex, MAC_GUID, "", sGUID) > 0
|
||||||
|
Dim sOrigGUID As String = ""
|
||||||
|
ReadMaterialParamString(nIndex, MAT_ORIG, "", sOrigGUID)
|
||||||
|
If sOrigGUID <> ORIG_MATERIAL Then
|
||||||
|
Dim Guid As Guid = Guid.Empty
|
||||||
|
Guid.TryParse(sGUID, Guid)
|
||||||
|
ReadMaterialParamString(nIndex, MAC_NAME, "", sName)
|
||||||
|
MachiningList.Add(New ImpExpMachiningItem(nIndex, Guid, sName, False))
|
||||||
|
End If
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
Case WindowTypeEnum.MACHINING
|
||||||
|
' leggo ed aggiungo le altre
|
||||||
|
Dim nIndex As Integer = 1
|
||||||
|
Dim sGUID As String = ""
|
||||||
|
Dim sName As String = ""
|
||||||
|
While ReadMachiningParamString(nIndex, MAC_GUID, "", sGUID) > 0
|
||||||
|
Dim Guid As Guid = Guid.Empty
|
||||||
|
Guid.TryParse(sGUID, Guid)
|
||||||
|
ReadMachiningParamString(nIndex, MAC_NAME, "", sName)
|
||||||
|
MachiningList.Add(New ImpExpMachiningItem(nIndex, Guid, sName, False))
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
End Select
|
||||||
|
Case WindowModeEnum.EXPORT_ORIG
|
||||||
|
If Type = WindowTypeEnum.MATERIAL Then
|
||||||
|
' leggo ed aggiungo le altre
|
||||||
|
Dim nIndex As Integer = 1
|
||||||
|
Dim sGUID As String = ""
|
||||||
|
Dim sName As String = ""
|
||||||
|
While ReadMaterialParamString(nIndex, MAC_GUID, "", sGUID) > 0
|
||||||
|
Dim sOrigGUID As String = ""
|
||||||
|
ReadMaterialParamString(nIndex, MAT_ORIG, "", sOrigGUID)
|
||||||
|
If sOrigGUID = ORIG_MATERIAL Then
|
||||||
|
Dim Guid As Guid = Guid.Empty
|
||||||
|
Guid.TryParse(sGUID, Guid)
|
||||||
|
ReadMaterialParamString(nIndex, MAC_NAME, "", sName)
|
||||||
|
MachiningList.Add(New ImpExpMachiningItem(nIndex, Guid, sName, False))
|
||||||
|
End If
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
ImpExpMachiningItem.m_delEnableOkBtn = AddressOf EnableOkBtn
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' import
|
||||||
|
Sub New(sImportFilePath As String)
|
||||||
|
m_WindowMode = WindowModeEnum.IMPORT
|
||||||
|
m_ImportFilePath = sImportFilePath
|
||||||
|
' carico lista lavorazioni
|
||||||
|
MachiningList.Clear()
|
||||||
|
' leggo ed aggiungo le altre
|
||||||
|
Dim nIndex As Integer = 1
|
||||||
|
Dim sGUID As String = ""
|
||||||
|
Dim sName As String = ""
|
||||||
|
Dim sMaterials As String = ""
|
||||||
|
While ReadMachiningParamString(nIndex, MAC_GUID, "", sGUID, sImportFilePath) > 0
|
||||||
|
Dim Guid As Guid = Guid.Empty
|
||||||
|
Guid.TryParse(sGUID, Guid)
|
||||||
|
ReadMachiningParamString(nIndex, MAC_NAME, "", sName, sImportFilePath)
|
||||||
|
MachiningList.Add(New ImpExpMachiningItem(nIndex, Guid, sName, AlreadyExist(sName)))
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
ImpExpMachiningItem.m_delEnableOkBtn = AddressOf EnableOkBtn
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Private Sub EnableOkBtn()
|
||||||
|
NotifyPropertyChanged(NameOf(IsEnabledOkBtn))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function AlreadyExist(MachiningName As String) As Boolean
|
||||||
|
Select Case m_WindowType
|
||||||
|
Case WindowTypeEnum.MATERIAL
|
||||||
|
Return Map.refMaterialDbVM.MaterialList.Any(Function(x) x.sName = MachiningName)
|
||||||
|
Case Else ' WindowTypeEnum.MACHINING
|
||||||
|
Return Map.refMachiningDbVM.MachiningList.Any(Function(x) x.sName = MachiningName)
|
||||||
|
End Select
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Enum MaterialState As Integer
|
||||||
|
NOTFOUND = 1
|
||||||
|
FOUND = 2
|
||||||
|
NOTORIGSAMENAME = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private Sub LoadOriginalMaterial()
|
||||||
|
m_WindowMode = WindowModeEnum.IMPORT_ORIG
|
||||||
|
' verifico se esistono materiali con lo stesso nome ma non originali
|
||||||
|
Dim ImportedMaterialList As New List(Of MaterialState)
|
||||||
|
For Each ImpExpMaterial In m_MachiningList
|
||||||
|
Dim IsNotOrigSameName As MaterialState = MaterialState.NOTFOUND
|
||||||
|
For Each DbMaterial In Map.refMaterialDbVM.MaterialList
|
||||||
|
If DbMaterial.sName = ImpExpMaterial.sName Then
|
||||||
|
Dim sOrigGUID As String = ""
|
||||||
|
ReadMaterialParamString(DbMaterial.nIndex, MAT_ORIG, "", sOrigGUID)
|
||||||
|
If sOrigGUID <> ORIG_MATERIAL Then
|
||||||
|
If Not IsNotOrigSameName Then IsNotOrigSameName = MaterialState.NOTORIGSAMENAME
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
IsNotOrigSameName = MaterialState.FOUND
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
ImportedMaterialList.Add(IsNotOrigSameName)
|
||||||
|
Next
|
||||||
|
If ImportedMaterialList.Contains(True) Then
|
||||||
|
Dim sDuplicatedMaterialList As String = ""
|
||||||
|
For Index = 0 To ImportedMaterialList.Count - 1
|
||||||
|
If ImportedMaterialList(Index) = MaterialState.NOTORIGSAMENAME Then
|
||||||
|
sDuplicatedMaterialList &= " - " & m_MachiningList(Index).sName & Environment.NewLine
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
MessageBox.Show("Impossible to import the package because materials named:" & Environment.NewLine &
|
||||||
|
sDuplicatedMaterialList & Environment.NewLine &
|
||||||
|
"Please modify the names of these machining and then retry to import the materials.")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' aggiorno/aggiungo materiali
|
||||||
|
Dim OrigFilePath As String = CurrentMachine.sMaterialFilePath
|
||||||
|
Dim NewMaterial As Material = Nothing
|
||||||
|
For Each Material In m_MachiningList
|
||||||
|
Dim nIndex As Integer = Map.refMaterialDbVM.MaterialList.Max(Function(x) x.nIndex) + 1
|
||||||
|
If Material.Active Then
|
||||||
|
CurrentMachine.SetMaterialFilePath(ImportFilePath)
|
||||||
|
' leggo lavorazione da file di import
|
||||||
|
NewMaterial = New Material(Material.nIndex)
|
||||||
|
' cambio guid, indice e verifico nome
|
||||||
|
NewMaterial.sGUID = Guid.NewGuid.ToString()
|
||||||
|
NewMaterial.SetIndex(nIndex)
|
||||||
|
If Material.AlreadyExist Then
|
||||||
|
If Material.ChangeName Then
|
||||||
|
NewMaterial.sName = Material.sName
|
||||||
|
Map.refMaterialDbVM.MaterialList.Add(NewMaterial)
|
||||||
|
Else
|
||||||
|
' sostituisco lavorazione gia' presente con stesso nome
|
||||||
|
Dim ToSubstituteMaterial As Material = Map.refMaterialDbVM.MaterialList.FirstOrDefault(Function(x) x.sName = Material.sName)
|
||||||
|
NewMaterial.SetIndex(ToSubstituteMaterial.nIndex)
|
||||||
|
NewMaterial.sGUID = ToSubstituteMaterial.sGUID
|
||||||
|
Dim nToReplaceIndex As Integer = Map.refMaterialDbVM.MaterialList.IndexOf(ToSubstituteMaterial)
|
||||||
|
Map.refMaterialDbVM.MaterialList(nToReplaceIndex) = NewMaterial
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Map.refMaterialDbVM.MaterialList.Add(NewMaterial)
|
||||||
|
End If
|
||||||
|
' ripristino path corretta del Db
|
||||||
|
CurrentMachine.SetMaterialFilePath(OrigFilePath)
|
||||||
|
' salvo la lavorazione
|
||||||
|
NewMaterial.Save()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' ripristino path corretta del Db
|
||||||
|
CurrentMachine.SetMaterialFilePath(OrigFilePath)
|
||||||
|
' seleziono ultima importata
|
||||||
|
If Not IsNothing(NewMaterial) Then
|
||||||
|
Map.refMaterialDbVM.SelMaterial = NewMaterial
|
||||||
|
Map.refMaterialDbVM.NotifyPropertyChanged(NameOf(Map.refMaterialDbVM.SelMaterial))
|
||||||
|
End If
|
||||||
|
' imposto Db modificato
|
||||||
|
Map.refMaterialDbVM.SetIsModified(True)
|
||||||
|
' messaggio con modifiche
|
||||||
|
Dim sMaterialList As String = ""
|
||||||
|
For Index = 0 To ImportedMaterialList.Count - 1
|
||||||
|
sMaterialList &= " - " & m_MachiningList(Index).sName & " (" & If(ImportedMaterialList(Index) = MaterialState.NOTFOUND, "New", "Updated") & ")" & Environment.NewLine
|
||||||
|
Next
|
||||||
|
MessageBox.Show("List of the materials:" & Environment.NewLine &
|
||||||
|
sMaterialList & Environment.NewLine &
|
||||||
|
"Import successfully completed.")
|
||||||
|
Return
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "OkCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that remove the current selected machining.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property OkCommand() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOk Is Nothing Then
|
||||||
|
m_cmdOk = New Command(AddressOf ConfirmImpExpMachinings)
|
||||||
|
End If
|
||||||
|
Return m_cmdOk
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Manage the MachiningDb closing. This method is invoked by the CloseMachiningDbCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub ConfirmImpExpMachinings(param As Object)
|
||||||
|
Select Case m_WindowMode
|
||||||
|
Case WindowModeEnum.IMPORT
|
||||||
|
Select Case m_WindowType
|
||||||
|
Case WindowTypeEnum.MATERIAL
|
||||||
|
Dim OrigFilePath As String = CurrentMachine.sMaterialFilePath
|
||||||
|
Dim NewMaterial As Material = Nothing
|
||||||
|
For Each Material In m_MachiningList
|
||||||
|
Dim nIndex As Integer = Map.refMaterialDbVM.MaterialList.Max(Function(x) x.nIndex) + 1
|
||||||
|
If Material.Active Then
|
||||||
|
CurrentMachine.SetMaterialFilePath(ImportFilePath)
|
||||||
|
' leggo lavorazione da file di import
|
||||||
|
NewMaterial = New Material(Material.nIndex)
|
||||||
|
' cambio guid, indice e verifico nome
|
||||||
|
NewMaterial.sGUID = Guid.NewGuid.ToString()
|
||||||
|
NewMaterial.SetIndex(nIndex)
|
||||||
|
If Material.AlreadyExist Then
|
||||||
|
If Material.ChangeName Then
|
||||||
|
NewMaterial.sName = Material.sName
|
||||||
|
Map.refMaterialDbVM.MaterialList.Add(NewMaterial)
|
||||||
|
Else
|
||||||
|
' sostituisco lavorazione gia' presente con stesso nome
|
||||||
|
Dim ToSubstituteMaterial As Material = Map.refMaterialDbVM.MaterialList.FirstOrDefault(Function(x) x.sName = Material.sName)
|
||||||
|
NewMaterial.SetIndex(ToSubstituteMaterial.nIndex)
|
||||||
|
NewMaterial.sGUID = ToSubstituteMaterial.sGUID
|
||||||
|
Dim nToReplaceIndex As Integer = Map.refMaterialDbVM.MaterialList.IndexOf(ToSubstituteMaterial)
|
||||||
|
Map.refMaterialDbVM.MaterialList(nToReplaceIndex) = NewMaterial
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Map.refMaterialDbVM.MaterialList.Add(NewMaterial)
|
||||||
|
End If
|
||||||
|
' ripristino path corretta del Db
|
||||||
|
CurrentMachine.SetMaterialFilePath(OrigFilePath)
|
||||||
|
' salvo la lavorazione
|
||||||
|
NewMaterial.Save()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' ripristino path corretta del Db
|
||||||
|
CurrentMachine.SetMaterialFilePath(OrigFilePath)
|
||||||
|
' seleziono ultima importata
|
||||||
|
If Not IsNothing(NewMaterial) Then
|
||||||
|
Map.refMaterialDbVM.SelMaterial = NewMaterial
|
||||||
|
Map.refMaterialDbVM.NotifyPropertyChanged(NameOf(Map.refMaterialDbVM.SelMaterial))
|
||||||
|
End If
|
||||||
|
' imposto Db modificato
|
||||||
|
Map.refMaterialDbVM.SetIsModified(True)
|
||||||
|
Case WindowTypeEnum.MACHINING
|
||||||
|
Dim OrigFilePath As String = CurrentMachine.sMachiningFilePath
|
||||||
|
Dim NewMachining As Machining = Nothing
|
||||||
|
For Each Machining In m_MachiningList
|
||||||
|
Dim nIndex As Integer = Map.refMachiningDbVM.MachiningList.Max(Function(x) x.nIndex) + 1
|
||||||
|
If Machining.Active Then
|
||||||
|
CurrentMachine.SetMachiningFilePath(ImportFilePath)
|
||||||
|
' leggo lavorazione da file di import
|
||||||
|
NewMachining = New Machining(Machining.nIndex)
|
||||||
|
' cambio guid, indice e verifico nome
|
||||||
|
NewMachining.sGUID = Guid.NewGuid.ToString()
|
||||||
|
NewMachining.SetIndex(nIndex)
|
||||||
|
If Machining.AlreadyExist Then
|
||||||
|
If Machining.ChangeName Then
|
||||||
|
NewMachining.sName = Machining.sName
|
||||||
|
Map.refMachiningDbVM.MachiningList.Add(NewMachining)
|
||||||
|
Else
|
||||||
|
' sostituisco lavorazione gia' presente con stesso nome
|
||||||
|
Dim ToSubstituteMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.sName = Machining.sName)
|
||||||
|
NewMachining.SetIndex(ToSubstituteMachining.nIndex)
|
||||||
|
NewMachining.sGUID = ToSubstituteMachining.sGUID
|
||||||
|
Dim nToReplaceIndex As Integer = Map.refMachiningDbVM.MachiningList.IndexOf(ToSubstituteMachining)
|
||||||
|
Map.refMachiningDbVM.MachiningList(nToReplaceIndex) = NewMachining
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Map.refMachiningDbVM.MachiningList.Add(NewMachining)
|
||||||
|
End If
|
||||||
|
' ripristino path corretta del Db
|
||||||
|
CurrentMachine.SetMachiningFilePath(OrigFilePath)
|
||||||
|
' salvo la lavorazione
|
||||||
|
NewMachining.Save()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' ripristino path corretta del Db
|
||||||
|
CurrentMachine.SetMachiningFilePath(OrigFilePath)
|
||||||
|
' seleziono ultima importata
|
||||||
|
If Not IsNothing(NewMachining) Then
|
||||||
|
Map.refMachiningDbVM.SelMachining = NewMachining
|
||||||
|
Map.refMachiningDbVM.NotifyPropertyChanged(NameOf(Map.refMachiningDbVM.SelMachining))
|
||||||
|
End If
|
||||||
|
' imposto Db modificato
|
||||||
|
Map.refMachiningDbVM.SetIsModified(True)
|
||||||
|
End Select
|
||||||
|
Case WindowModeEnum.EXPORT, WindowModeEnum.EXPORT_ORIG
|
||||||
|
' chiedo il nome con cui salvare il file
|
||||||
|
Dim sExtension As String =""
|
||||||
|
If m_WindowType = WindowTypeEnum.MATERIAL Then
|
||||||
|
If m_WindowMode = WindowModeEnum.EXPORT_ORIG Then
|
||||||
|
sExtension = OriginalMaterialDataExtension
|
||||||
|
Else
|
||||||
|
sExtension = MaterialDataExtension
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
sExtension = MachiningDataExtension
|
||||||
|
End If
|
||||||
|
Dim SaveFileDlg As New System.Windows.Forms.SaveFileDialog() With {
|
||||||
|
.Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||||
|
.Filter = "File data (*" & sExtension & ")|*" & sExtension,
|
||||||
|
.FileName = String.Empty
|
||||||
|
}
|
||||||
|
If SaveFileDlg.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then Return
|
||||||
|
Dim sFilePath As String = String.Empty
|
||||||
|
sFilePath = SaveFileDlg.FileName
|
||||||
|
' se esiste già lo elimino
|
||||||
|
If File.Exists(sFilePath) Then
|
||||||
|
Try
|
||||||
|
File.Delete(sFilePath)
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
' creo nuovo file
|
||||||
|
If Not File.Exists(sFilePath) Then
|
||||||
|
Try
|
||||||
|
File.WriteAllLines(sFilePath, {"; Commento per evitare BOM con UTF-8"})
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Select Case m_WindowType
|
||||||
|
Case WindowTypeEnum.MATERIAL
|
||||||
|
Dim ActiveMachiningList As List(Of Material) = (From Material In Map.refMaterialDbVM.MaterialList
|
||||||
|
Select Material
|
||||||
|
Where m_MachiningList.Any(Function(x) x.sGUID.ToString() = Material.sGUID AndAlso x.Active)).ToList()
|
||||||
|
' salvo tutti i materiali sul Db
|
||||||
|
For Index = 0 To ActiveMachiningList.Count - 1
|
||||||
|
ActiveMachiningList(Index).WriteParamsOnDb(Index + 1, sFilePath)
|
||||||
|
Next
|
||||||
|
Case WindowTypeEnum.MACHINING
|
||||||
|
Dim ActiveMachiningList As List(Of Machining) = (From Machining In Map.refMachiningDbVM.MachiningList
|
||||||
|
Select Machining
|
||||||
|
Where m_MachiningList.Any(Function(x) x.sGUID.ToString() = Machining.sGUID AndAlso x.Active)).ToList()
|
||||||
|
' salvo tutte le lavorazioni sul Db
|
||||||
|
For Index = 0 To ActiveMachiningList.Count - 1
|
||||||
|
ActiveMachiningList(Index).WriteParamsOnDb(Index + 1, sFilePath)
|
||||||
|
Next
|
||||||
|
End Select
|
||||||
|
End Select
|
||||||
|
' Chiusura finestra
|
||||||
|
RaiseEvent m_CloseWindow(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' OkCommand
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class ImpExpMachiningItem
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Const IMPEXPNAME As String = "_imp"
|
||||||
|
|
||||||
|
' Actions
|
||||||
|
Friend Shared m_delEnableOkBtn As Action
|
||||||
|
|
||||||
|
Private Shared m_Empty As New MachiningIndex(-1, Guid.Empty, "None")
|
||||||
|
|
||||||
|
Private Shared m_WindowType As WindowTypeEnum
|
||||||
|
Friend Shared Sub SetWindowType(value As WindowTypeEnum)
|
||||||
|
m_WindowType = value
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_nIndex As Integer
|
||||||
|
Public ReadOnly Property nIndex As Integer
|
||||||
|
Get
|
||||||
|
Return m_nIndex
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sGUID As Guid
|
||||||
|
Public ReadOnly Property sGUID As Guid
|
||||||
|
Get
|
||||||
|
Return m_sGUID
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sOrigName As String
|
||||||
|
Private m_sName As String
|
||||||
|
Public ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Active As Boolean
|
||||||
|
Public Property Active As Boolean
|
||||||
|
Get
|
||||||
|
Return m_Active
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
' se esiste gia' chiedo se sovrascriverla
|
||||||
|
If value Then
|
||||||
|
If m_AlreadyExist Then
|
||||||
|
Select Case m_WindowType
|
||||||
|
Case WindowTypeEnum.MATERIAL
|
||||||
|
Select Case System.Windows.MessageBox.Show("Material already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
|
||||||
|
Case MessageBoxResult.Yes
|
||||||
|
m_ChangeName = False
|
||||||
|
m_Active = True
|
||||||
|
Case MessageBoxResult.No
|
||||||
|
Dim bImpNameAlreadyInList = False
|
||||||
|
Dim nImpNameIndex As Integer = 0
|
||||||
|
If Map.refMaterialDbVM.MaterialList.Any(Function(x) x.sName = m_sOrigName & IMPEXPNAME) Then
|
||||||
|
nImpNameIndex += 1
|
||||||
|
While Map.refMaterialDbVM.MaterialList.Any(Function(x) x.sName = m_sOrigName & IMPEXPNAME & "_" & nImpNameIndex)
|
||||||
|
nImpNameIndex += 1
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "")
|
||||||
|
System.Windows.MessageBox.Show("Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
|
||||||
|
NotifyPropertyChanged(NameOf(sName))
|
||||||
|
m_ChangeName = True
|
||||||
|
m_Active = True
|
||||||
|
Case Else
|
||||||
|
m_Active = False
|
||||||
|
End Select
|
||||||
|
Case WindowTypeEnum.MACHINING
|
||||||
|
Select Case System.Windows.MessageBox.Show("Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
|
||||||
|
Case MessageBoxResult.Yes
|
||||||
|
m_ChangeName = False
|
||||||
|
m_Active = True
|
||||||
|
Case MessageBoxResult.No
|
||||||
|
Dim bImpNameAlreadyInList = False
|
||||||
|
Dim nImpNameIndex As Integer = 0
|
||||||
|
If Map.refMachiningDbVM.MachiningList.Any(Function(x) x.sName = m_sOrigName & IMPEXPNAME) Then
|
||||||
|
nImpNameIndex += 1
|
||||||
|
While Map.refMachiningDbVM.MachiningList.Any(Function(x) x.sName = m_sOrigName & IMPEXPNAME & "_" & nImpNameIndex)
|
||||||
|
nImpNameIndex += 1
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "")
|
||||||
|
System.Windows.MessageBox.Show("Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
|
||||||
|
NotifyPropertyChanged(NameOf(sName))
|
||||||
|
m_ChangeName = True
|
||||||
|
m_Active = True
|
||||||
|
Case Else
|
||||||
|
m_Active = False
|
||||||
|
End Select
|
||||||
|
End Select
|
||||||
|
NotifyPropertyChanged(NameOf(Active))
|
||||||
|
Else
|
||||||
|
m_Active = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
m_ChangeName = False
|
||||||
|
m_Active = False
|
||||||
|
m_sName = m_sOrigName
|
||||||
|
NotifyPropertyChanged(NameOf(sName))
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(Overwrite_Visibility))
|
||||||
|
If Not IsNothing(m_delEnableOkBtn) Then m_delEnableOkBtn()
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Parametro che indica se questo item da importare esiste gia'
|
||||||
|
Private m_AlreadyExist As Boolean
|
||||||
|
Friend ReadOnly Property AlreadyExist As Boolean
|
||||||
|
Get
|
||||||
|
Return m_AlreadyExist
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Overwrite_Visibility As Visibility = Visibility.Collapsed
|
||||||
|
Public ReadOnly Property Overwrite_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If(m_Active AndAlso m_AlreadyExist AndAlso Not m_ChangeName, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Parametro che indica se cambiare il nome di un item che esiste gia' o sovrascriverlo
|
||||||
|
Private m_ChangeName As Boolean
|
||||||
|
Friend Property ChangeName As Boolean
|
||||||
|
Get
|
||||||
|
Return m_ChangeName
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_ChangeName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nIndex As Integer, GUID As Guid, sName As String, AlreadyExist As Boolean)
|
||||||
|
m_nIndex = nIndex
|
||||||
|
m_sGUID = GUID
|
||||||
|
m_sOrigName = sName
|
||||||
|
m_sName = sName
|
||||||
|
m_AlreadyExist = AlreadyExist
|
||||||
|
m_Active = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Shared Function Empty() As MachiningIndex
|
||||||
|
Return m_Empty
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<EgtWPFLib5:EgtMainWindow x:Class="ImportLoadingWndV"
|
||||||
|
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="New Project"
|
||||||
|
SizeToContent="WidthAndHeight"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
Style="{StaticResource Dialog_Window}">
|
||||||
|
<Grid Margin="2.5,2.5,2.5,2.5">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="{Binding Loading_Msg}"
|
||||||
|
Margin="20,20,20,2.5"
|
||||||
|
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||||
|
<Grid Grid.Row="1"
|
||||||
|
Margin="2.5,2.5,2.5,2.5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ProgressBar Value="{Binding Loading_Value}"
|
||||||
|
Width="200"
|
||||||
|
Margin="0,0,2.5,20"
|
||||||
|
Style="{StaticResource Icarus_ProgressBar}"/>
|
||||||
|
<!--<Button Grid.Column="1"
|
||||||
|
Grid.RowSpan="2"
|
||||||
|
Command="{Binding Stop_Command}"
|
||||||
|
Margin="2.5,0,0,0"
|
||||||
|
Style="{StaticResource TopPanel_Button}">
|
||||||
|
<Image Source="\Resources\SliceManager\StopCalculation.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>-->
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
Public Class ImportLoadingWndV
|
||||||
|
|
||||||
|
Private WithEvents m_ImportLoadingWndVM As ImportLoadingWndVM
|
||||||
|
|
||||||
|
Sub New(Owner As Window, ImportLoadingWndVM As ImportLoadingWndVM)
|
||||||
|
MyBase.New(Owner)
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = ImportLoadingWndVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_ImportLoadingWndVM = ImportLoadingWndVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class ImportLoadingWndVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
' Funzioni di callback per output in interfaccia da LUA
|
||||||
|
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
|
||||||
|
|
||||||
|
Private m_bStopLoading As Boolean = False
|
||||||
|
|
||||||
|
Private m_Loading_Value As Double
|
||||||
|
Public Property Loading_Value As Double
|
||||||
|
Get
|
||||||
|
Return m_Loading_Value
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_Loading_Value = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdStop As ICommand
|
||||||
|
|
||||||
|
#End Region ' FIELDS & PROPERTIES
|
||||||
|
|
||||||
|
#Region "MESSAGES"
|
||||||
|
|
||||||
|
Public ReadOnly Property Loading_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Importing file..."
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' MESSAGES
|
||||||
|
|
||||||
|
#Region "CONSTRUCTORS"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.SetRefImportLoadingWndVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CONSTRUCTORS
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Friend Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
|
||||||
|
m_Loading_Value = nProg
|
||||||
|
NotifyPropertyChanged(NameOf(Loading_Value))
|
||||||
|
' Costringo ad aggiornare
|
||||||
|
UpdateUI()
|
||||||
|
' Eventuale attesa
|
||||||
|
Threading.Thread.Sleep(nPause)
|
||||||
|
' Ritorno eventuale stop
|
||||||
|
If m_bStopLoading Then
|
||||||
|
m_bStopLoading = False
|
||||||
|
Return 1
|
||||||
|
Else
|
||||||
|
Return 0
|
||||||
|
End If
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Stop"
|
||||||
|
|
||||||
|
Public ReadOnly Property Stop_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdStop Is Nothing Then
|
||||||
|
m_cmdStop = New Command(AddressOf StopLoading)
|
||||||
|
End If
|
||||||
|
Return m_cmdStop
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub StopLoading()
|
||||||
|
m_bStopLoading = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Stop
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
<UserControl x:Class="ImportPanelV"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:local="clr-namespace:Icarus"
|
|
||||||
Width="150"
|
|
||||||
Margin="5,0,0,0">
|
|
||||||
<Grid DockPanel.Dock="Left">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Border Style="{StaticResource LeftPanelTitle_Border}">
|
|
||||||
<TextBlock Text="New part list"
|
|
||||||
FontWeight="DemiBold"
|
|
||||||
FontSize="14"/>
|
|
||||||
</Border>
|
|
||||||
<DockPanel Grid.Row="1">
|
|
||||||
<Button DockPanel.Dock="Left"
|
|
||||||
Content="+"
|
|
||||||
FontSize="20"
|
|
||||||
Command="{Binding AddPart_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_Button}"/>
|
|
||||||
<Button DockPanel.Dock="Left"
|
|
||||||
Content="-"
|
|
||||||
FontSize="20"
|
|
||||||
Command="{Binding RemovePart_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_Button}"/>
|
|
||||||
<Button Content="Reference"
|
|
||||||
Command="{Binding SetReference_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
|
||||||
</DockPanel>
|
|
||||||
<TreeView Grid.Row="2"
|
|
||||||
ItemsSource="{Binding ImportPartList}"
|
|
||||||
MinHeight="300">
|
|
||||||
<TreeView.Resources>
|
|
||||||
<HierarchicalDataTemplate DataType="{x:Type local:ImportPart}"
|
|
||||||
ItemsSource="{Binding LayerList}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="/Resources/TreeView/Folder.png"
|
|
||||||
Height="15"/>
|
|
||||||
<TextBlock Text="{Binding ghName}" />
|
|
||||||
</StackPanel>
|
|
||||||
</HierarchicalDataTemplate>
|
|
||||||
<HierarchicalDataTemplate DataType="{x:Type local:ImportLayer}"
|
|
||||||
ItemsSource="{Binding EntityList, UpdateSourceTrigger=PropertyChanged}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="/Resources/TreeView/Folder.png"
|
|
||||||
Height="15"/>
|
|
||||||
<TextBlock Text="{Binding sName}" />
|
|
||||||
</StackPanel>
|
|
||||||
</HierarchicalDataTemplate>
|
|
||||||
<HierarchicalDataTemplate DataType="{x:Type local:GeomEntity}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<!--<Image Source="/WpfTutorialSamples;component/Images/user.png" Margin="0,0,5,0" />-->
|
|
||||||
<TextBlock Text="{Binding ghName}" />
|
|
||||||
<TextBlock Text="{Binding ghReference, UpdateSourceTrigger=PropertyChanged}"/>
|
|
||||||
</StackPanel>
|
|
||||||
</HierarchicalDataTemplate>
|
|
||||||
</TreeView.Resources>
|
|
||||||
<TreeView.ItemContainerStyle>
|
|
||||||
<Style TargetType="{x:Type TreeViewItem}">
|
|
||||||
<Setter Property="IsSelected" Value="{Binding bIsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
||||||
<Setter Property="IsExpanded" Value="True" />
|
|
||||||
</Style>
|
|
||||||
</TreeView.ItemContainerStyle>
|
|
||||||
</TreeView>
|
|
||||||
<Border Grid.Row="3"
|
|
||||||
Style="{StaticResource LeftPanelTitle_Border}">
|
|
||||||
<TextBlock Text="Imported entity list"
|
|
||||||
FontWeight="DemiBold"
|
|
||||||
FontSize="14"/>
|
|
||||||
</Border>
|
|
||||||
<ListBox Grid.Row="4"
|
|
||||||
ItemsSource="{Binding ImportedEntityList, UpdateSourceTrigger=PropertyChanged}"
|
|
||||||
SelectedItem="{Binding SelImportedEntity}"
|
|
||||||
MinHeight="200">
|
|
||||||
<ListBox.ItemContainerStyle>
|
|
||||||
<Style TargetType="ListBoxItem">
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
||||||
</Style>
|
|
||||||
</ListBox.ItemContainerStyle>
|
|
||||||
<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Grid HorizontalAlignment="Stretch">
|
|
||||||
<Grid.InputBindings>
|
|
||||||
<MouseBinding Gesture="LeftDoubleClick"
|
|
||||||
Command="{Binding ImportedEntity_DoubleClick}"/>
|
|
||||||
</Grid.InputBindings>
|
|
||||||
<TextBlock Text="{Binding ghName}">
|
|
||||||
</TextBlock>
|
|
||||||
</Grid>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>
|
|
||||||
</ListBox>
|
|
||||||
<UniformGrid Grid.Row="5"
|
|
||||||
Rows="1">
|
|
||||||
<Button Content="Ok"
|
|
||||||
Command="{Binding Ok_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
|
||||||
<Button Content="Cancel"
|
|
||||||
Command="{Binding Cancel_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
|
||||||
</UniformGrid>
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Public Class ImportPanelV
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,443 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class ImportPanelVM
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
Private m_nImportedPartId As Integer = GDB_ID.NULL
|
|
||||||
Friend ReadOnly Property nImportedPartId As Integer
|
|
||||||
Get
|
|
||||||
Return m_nImportedPartId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_ImportedEntityList As New ObservableCollection(Of GeomEntity)
|
|
||||||
Public Property ImportedEntityList As ObservableCollection(Of GeomEntity)
|
|
||||||
Get
|
|
||||||
Return m_ImportedEntityList
|
|
||||||
End Get
|
|
||||||
Set(value As ObservableCollection(Of GeomEntity))
|
|
||||||
m_ImportedEntityList = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_SelImportedEntity As GeomEntity
|
|
||||||
Public Property SelImportedEntity As GeomEntity
|
|
||||||
Get
|
|
||||||
Return m_SelImportedEntity
|
|
||||||
End Get
|
|
||||||
Set(value As GeomEntity)
|
|
||||||
m_SelImportedEntity = value
|
|
||||||
EgtDeselectAll()
|
|
||||||
If Not IsNothing(m_SelImportedEntity) Then
|
|
||||||
EgtSelectObj(m_SelImportedEntity.nId)
|
|
||||||
End If
|
|
||||||
EgtDraw()
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Friend Sub SetSelImportedEntity(nId As Integer)
|
|
||||||
m_SelImportedEntity = Map.refImportPanelVM.ImportedEntityList.FirstOrDefault(Function(x) x.nId = nId)
|
|
||||||
EgtDeselectAll()
|
|
||||||
If Not IsNothing(m_SelImportedEntity) Then
|
|
||||||
EgtSelectObj(m_SelImportedEntity.nId)
|
|
||||||
End If
|
|
||||||
EgtDraw()
|
|
||||||
NotifyPropertyChanged(NameOf(SelImportedEntity))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private m_ImportPartList As New ObservableCollection(Of ImportPart)
|
|
||||||
Public ReadOnly Property ImportPartList As ObservableCollection(Of ImportPart)
|
|
||||||
Get
|
|
||||||
Return m_ImportPartList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_SelImportPart As ImportPart
|
|
||||||
Friend Sub SetSelImportPart(SelImportPart As ImportPart)
|
|
||||||
m_SelImportPart = SelImportPart
|
|
||||||
m_SelImportLayer = Nothing
|
|
||||||
End Sub
|
|
||||||
Public ReadOnly Property SelImportPart As ImportPart
|
|
||||||
Get
|
|
||||||
Return m_SelImportPart
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_SelImportLayer As ImportLayer
|
|
||||||
Public ReadOnly Property SelImportLayer As ImportLayer
|
|
||||||
Get
|
|
||||||
Return m_SelImportLayer
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Friend Sub SetSelImportLayer(SelImportLayer As ImportLayer)
|
|
||||||
m_SelImportPart = m_ImportPartList.FirstOrDefault(Function(x) x.LayerList.Contains(SelImportLayer))
|
|
||||||
m_SelImportLayer = SelImportLayer
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private m_SelGeomEntity As GeomEntity
|
|
||||||
Public ReadOnly Property SelGeomEntity As GeomEntity
|
|
||||||
Get
|
|
||||||
Return m_SelGeomEntity
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Friend Sub SetSelGeomEntity(SelGeomEntity As GeomEntity)
|
|
||||||
For Each CurrPart In m_ImportPartList
|
|
||||||
Dim CurrLayer As ImportLayer = CurrPart.LayerList.FirstOrDefault(Function(x) x.EntityList.Contains(SelGeomEntity))
|
|
||||||
If Not IsNothing(CurrLayer) Then
|
|
||||||
m_SelImportPart = CurrPart
|
|
||||||
m_SelImportLayer = CurrLayer
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
m_SelGeomEntity = SelGeomEntity
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' Definizione comandi
|
|
||||||
Private m_cmdSetReference As ICommand
|
|
||||||
Private m_cmdAddPart As ICommand
|
|
||||||
Private m_cmdRemovePart As ICommand
|
|
||||||
Private m_cmdOk As ICommand
|
|
||||||
Private m_cmdCancel As ICommand
|
|
||||||
|
|
||||||
Sub New()
|
|
||||||
' Creo riferimento a questa classe in EgtCAM5Map
|
|
||||||
Map.SetRefImportPanelVM(Me)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
Friend Sub Init()
|
|
||||||
m_ImportedEntityList.Clear()
|
|
||||||
m_ImportPartList.Clear()
|
|
||||||
' aggiungo geometrie importate a lista
|
|
||||||
m_nImportedPartId = EgtGetLastPart()
|
|
||||||
Dim nLayerId As Integer = EgtGetFirstLayer(m_nImportedPartId)
|
|
||||||
Dim nGeometryId As Integer = EgtGetFirstInGroup(nLayerId)
|
|
||||||
While nGeometryId <> GDB_ID.NULL
|
|
||||||
Dim sGeometryName As String = ""
|
|
||||||
EgtGetName(nGeometryId, sGeometryName)
|
|
||||||
m_ImportedEntityList.Add(New GeomEntity(nGeometryId, sGeometryName))
|
|
||||||
nGeometryId = EgtGetNext(nGeometryId)
|
|
||||||
End While
|
|
||||||
' aggiungo primo pezzo
|
|
||||||
m_ImportPartList.Add(New ImportPart())
|
|
||||||
m_ImportPartList(0).LayerList.FirstOrDefault(Function(x) x.Type = ImportLayer.LayerType.PRINT_SOLID).bIsSelected = True
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
|
||||||
|
|
||||||
#Region "SetReference"
|
|
||||||
|
|
||||||
Public ReadOnly Property SetReference_Command As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdSetReference Is Nothing Then
|
|
||||||
m_cmdSetReference = New Command(AddressOf SetReference)
|
|
||||||
End If
|
|
||||||
Return m_cmdSetReference
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Sub SetReference()
|
|
||||||
If Not IsNothing(SelGeomEntity) Then
|
|
||||||
Dim ChooseReferenceWndVM As New ChooseReferenceWndVM
|
|
||||||
Dim ChooseReferenceWndV As New ChooseReferenceWndV(Application.Current.MainWindow, ChooseReferenceWndVM)
|
|
||||||
If Not ChooseReferenceWndV.ShowDialog() Then Return
|
|
||||||
SelGeomEntity.Reference = ChooseReferenceWndVM.SelReference
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' SetReference
|
|
||||||
|
|
||||||
#Region "AddPart"
|
|
||||||
|
|
||||||
Public ReadOnly Property AddPart_Command As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdAddPart Is Nothing Then
|
|
||||||
m_cmdAddPart = New Command(AddressOf AddPart)
|
|
||||||
End If
|
|
||||||
Return m_cmdAddPart
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Sub AddPart()
|
|
||||||
m_ImportPartList.Add(New ImportPart)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' AddPart
|
|
||||||
|
|
||||||
#Region "RemovePart"
|
|
||||||
|
|
||||||
Public ReadOnly Property RemovePart_Command As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdRemovePart Is Nothing Then
|
|
||||||
m_cmdRemovePart = New Command(AddressOf RemovePart)
|
|
||||||
End If
|
|
||||||
Return m_cmdRemovePart
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Sub RemovePart()
|
|
||||||
If IsNothing(SelImportLayer) Then
|
|
||||||
' rimuovo pezzo
|
|
||||||
m_ImportPartList.Remove(SelImportPart)
|
|
||||||
Else
|
|
||||||
' rimuovo geometria
|
|
||||||
Dim CurrEntity As GeomEntity = m_SelGeomEntity
|
|
||||||
SelImportLayer.EntityList.Remove(m_SelGeomEntity)
|
|
||||||
' la rimetto in lista importati
|
|
||||||
ImportedEntityList.Add(CurrEntity)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' RemovePart
|
|
||||||
|
|
||||||
#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 sErr As New List(Of String)
|
|
||||||
' verifico che tutti i pezzi abbiano una superficie da stampare nel layer apposito
|
|
||||||
For Each CurrPart In m_ImportPartList
|
|
||||||
For Each CurrLayer In CurrPart.LayerList
|
|
||||||
Select Case CurrLayer.Type
|
|
||||||
Case ImportLayer.LayerType.PRINT_SOLID
|
|
||||||
If CurrLayer.EntityList.Count = 0 Then
|
|
||||||
If sErr.Count > 0 Then sErr(sErr.Count - 1) &= Environment.NewLine
|
|
||||||
sErr.Add(CurrPart.ghName & " - No print surface defined!")
|
|
||||||
End If
|
|
||||||
End Select
|
|
||||||
Next
|
|
||||||
Next
|
|
||||||
If sErr.Count > 0 Then
|
|
||||||
MessageBox.Show(String.Concat(sErr), "Error")
|
|
||||||
Return
|
|
||||||
Else
|
|
||||||
' Creo pezzi e layer necessari
|
|
||||||
For ImportPartIndex = 0 To m_ImportPartList.Count - 1
|
|
||||||
Dim ImportPart As ImportPart = m_ImportPartList(ImportPartIndex)
|
|
||||||
Dim frImportedPart As New Frame3d
|
|
||||||
EgtGetGroupGlobFrame(m_nImportedPartId, frImportedPart)
|
|
||||||
Dim nPartId As Integer = EgtCreateGroup(GDB_ID.ROOT, frImportedPart)
|
|
||||||
EgtSetName(nPartId, PART)
|
|
||||||
Dim nFrameId As Integer = GDB_ID.NULL
|
|
||||||
Dim b3PrintSolid As New BBox3d
|
|
||||||
Dim nPrintPartLayerId As Integer = GDB_ID.NULL
|
|
||||||
Dim PrintSolidEntity As GeomEntity = Nothing
|
|
||||||
Dim nOriginalPartLayerId As Integer = GDB_ID.NULL
|
|
||||||
Dim nRibsLayerId As Integer = GDB_ID.NULL
|
|
||||||
Dim nShellNumberLayerId As Integer = GDB_ID.NULL
|
|
||||||
Dim nAuxSolidsLayerId As Integer = GDB_ID.NULL
|
|
||||||
Dim nMachStartLayerId As Integer = GDB_ID.NULL
|
|
||||||
Dim nOthersLayerId As Integer = GDB_ID.NULL
|
|
||||||
For Each ImportLayer In ImportPart.LayerList
|
|
||||||
Select Case ImportLayer.Type
|
|
||||||
Case ImportLayer.LayerType.PRINT_SOLID
|
|
||||||
nPrintPartLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nPrintPartLayerId, PRINT_SOLID)
|
|
||||||
If ImportLayer.EntityList.Count > 0 Then
|
|
||||||
PrintSolidEntity = ImportLayer.EntityList(0)
|
|
||||||
EgtRelocateGlob(PrintSolidEntity.nId, nPrintPartLayerId, GDB_POS.LAST_SON)
|
|
||||||
' calcolo box superficie per creazione riferimento
|
|
||||||
EgtGetBBoxGlob(PrintSolidEntity.nId, GDB_BB.STANDARD, b3PrintSolid)
|
|
||||||
End If
|
|
||||||
'Case ImportLayer.LayerType.ORIGINAL_SOLID
|
|
||||||
' nOriginalPartLayerId = EgtCreateGroup(nPartId)
|
|
||||||
' EgtSetName(nOriginalPartLayerId, ORIGINAL_SOLID)
|
|
||||||
' For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
' EgtRelocateGlob(GeomEntity.nId, nOriginalPartLayerId, GDB_POS.LAST_SON)
|
|
||||||
' Next
|
|
||||||
Case ImportLayer.LayerType.MACH_START
|
|
||||||
nMachStartLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nMachStartLayerId, LAY_MACH_START)
|
|
||||||
Dim nMachStartId As Integer = GDB_ID.NULL
|
|
||||||
If ImportLayer.EntityList.Count > 0 Then
|
|
||||||
For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
' se punto o curva compo
|
|
||||||
Dim EntityType As GDB_TY = EgtGetType(GeomEntity.nId)
|
|
||||||
Select Case EntityType
|
|
||||||
Case GDB_TY.GEO_POINT, GDB_TY.CRV_COMPO
|
|
||||||
' gli cambio layer
|
|
||||||
EgtRelocateGlob(GeomEntity.nId, nMachStartLayerId, GDB_POS.LAST_SON)
|
|
||||||
nMachStartId = GeomEntity.nId
|
|
||||||
Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
|
|
||||||
' altrimenti la trasformo in curva compo
|
|
||||||
nMachStartId = EgtCreateCurveCompo(nMachStartLayerId, GeomEntity.nId, True)
|
|
||||||
End Select
|
|
||||||
EgtSetName(nMachStartId, START_GEOM)
|
|
||||||
' coloro l'entita' di rosso
|
|
||||||
Dim c3Red As Color3d
|
|
||||||
c3Red.FromColor(System.Drawing.Color.Red)
|
|
||||||
EgtSetColor(nMachStartId, c3Red)
|
|
||||||
Next
|
|
||||||
Else
|
|
||||||
' creo punto di partenza
|
|
||||||
Dim ptStart As Point3d = b3PrintSolid.Center() - 0.6 * b3PrintSolid.DimY() * Vector3d.Y_AX() - 0.5 * b3PrintSolid.DimZ() * Vector3d.Z_AX()
|
|
||||||
nMachStartId = EgtCreateGeoPoint(nMachStartLayerId, ptStart, GDB_RT.GLOB)
|
|
||||||
EgtSetName(nMachStartId, START_GEOM)
|
|
||||||
' coloro l'entita' di rosso
|
|
||||||
Dim c3Red As Color3d
|
|
||||||
c3Red.FromColor(System.Drawing.Color.Red)
|
|
||||||
EgtSetColor(nMachStartId, c3Red)
|
|
||||||
End If
|
|
||||||
Case ImportLayer.LayerType.RIBS
|
|
||||||
nRibsLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nRibsLayerId, LAY_RIBS)
|
|
||||||
For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
EgtSetInfo(GeomEntity.nId, KEY_RIB_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
|
||||||
EgtRelocateGlob(GeomEntity.nId, nRibsLayerId, GDB_POS.LAST_SON)
|
|
||||||
' coloro l'entita' di viola
|
|
||||||
Dim c3LightBlue As Color3d
|
|
||||||
c3LightBlue.FromColor(System.Drawing.Color.MediumOrchid)
|
|
||||||
EgtSetColor(GeomEntity.nId, c3LightBlue)
|
|
||||||
Next
|
|
||||||
Case ImportLayer.LayerType.SHELL_NUMBER
|
|
||||||
nShellNumberLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nShellNumberLayerId, LAY_SHELL_NBR)
|
|
||||||
For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
EgtSetInfo(GeomEntity.nId, KEY_SHELLNBR_TYPE, ShellNumberEntity.ShellNumberTypes.FROMIMPORT)
|
|
||||||
EgtRelocateGlob(GeomEntity.nId, nShellNumberLayerId, GDB_POS.LAST_SON)
|
|
||||||
' coloro l'entita' di verde
|
|
||||||
Dim c3LightBlue As Color3d
|
|
||||||
c3LightBlue.FromColor(System.Drawing.Color.Lime)
|
|
||||||
EgtSetColor(GeomEntity.nId, c3LightBlue)
|
|
||||||
Next
|
|
||||||
Case ImportLayer.LayerType.AUX_SOLIDS
|
|
||||||
nAuxSolidsLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nAuxSolidsLayerId, LAY_AUX_SOLIDS)
|
|
||||||
For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
EgtSetInfo(GeomEntity.nId, KEY_AUXSOLID_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
|
||||||
EgtRelocateGlob(GeomEntity.nId, nAuxSolidsLayerId, GDB_POS.LAST_SON)
|
|
||||||
' coloro l'entita' di oro
|
|
||||||
Dim c3LightBlue As Color3d
|
|
||||||
c3LightBlue.FromColor(System.Drawing.Color.DarkGoldenrod)
|
|
||||||
EgtSetColor(GeomEntity.nId, c3LightBlue)
|
|
||||||
Next
|
|
||||||
Case ImportLayer.LayerType.OTHERS
|
|
||||||
nOthersLayerId = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nOthersLayerId, LAY_OTHERS)
|
|
||||||
For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
EgtRelocateGlob(GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON)
|
|
||||||
Next
|
|
||||||
If ImportPartIndex = 0 Then
|
|
||||||
For Each GeomEntity In ImportedEntityList
|
|
||||||
' se curva
|
|
||||||
Dim EntityType As GDB_TY = EgtGetType(GeomEntity.nId)
|
|
||||||
Select Case EntityType
|
|
||||||
Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
|
|
||||||
' la trasformo in curva compo
|
|
||||||
EgtCreateCurveCompo(nOthersLayerId, GeomEntity.nId, True)
|
|
||||||
Case Else
|
|
||||||
' altrimenti la sposto solamente
|
|
||||||
EgtRelocateGlob(GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON)
|
|
||||||
End Select
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End Select
|
|
||||||
Next
|
|
||||||
' aggiungo riferimento
|
|
||||||
Dim nReferenceLayerId As Integer = EgtCreateGroup(nPartId)
|
|
||||||
EgtSetName(nReferenceLayerId, LAY_REFERENCE)
|
|
||||||
' Creo riferimento
|
|
||||||
Dim ptOrig As New Point3d(b3PrintSolid.Min())
|
|
||||||
Select Case PrintSolidEntity.Reference
|
|
||||||
Case ChooseReferenceWndVM.References.TL
|
|
||||||
ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX
|
|
||||||
Case ChooseReferenceWndVM.References.TR
|
|
||||||
ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX + b3PrintSolid.DimX() * Vector3d.X_AX
|
|
||||||
Case ChooseReferenceWndVM.References.BL
|
|
||||||
Case ChooseReferenceWndVM.References.BR
|
|
||||||
ptOrig += b3PrintSolid.DimX() * Vector3d.X_AX
|
|
||||||
Case ChooseReferenceWndVM.References.TC
|
|
||||||
ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX + b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
|
||||||
Case ChooseReferenceWndVM.References.ML
|
|
||||||
ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX
|
|
||||||
Case ChooseReferenceWndVM.References.MR
|
|
||||||
ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX + b3PrintSolid.DimX() * Vector3d.X_AX
|
|
||||||
Case ChooseReferenceWndVM.References.TC
|
|
||||||
ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX + b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
|
||||||
Case ChooseReferenceWndVM.References.MR
|
|
||||||
ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX + b3PrintSolid.DimX() * Vector3d.X_AX
|
|
||||||
Case ChooseReferenceWndVM.References.BC
|
|
||||||
ptOrig += b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
|
||||||
Case ChooseReferenceWndVM.References.MC
|
|
||||||
ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX + b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
|
||||||
End Select
|
|
||||||
Dim frPrintSolid As New Frame3d(ptOrig)
|
|
||||||
nFrameId = EgtCreateGeoFrame(nReferenceLayerId, frPrintSolid, GDB_RT.GLOB)
|
|
||||||
If nFrameId Then
|
|
||||||
EgtSetName(nFrameId, FRAME_PART)
|
|
||||||
EgtSetMode(nFrameId, GDB_MD.LOCKED)
|
|
||||||
End If
|
|
||||||
EgtSetInfo(nReferenceLayerId, KEY_REFERENCE, PrintSolidEntity.Reference)
|
|
||||||
' appoggio il pezzo sulla tavola
|
|
||||||
EgtMove(nPartId, New Vector3d(0, 0, -b3PrintSolid.Min.z))
|
|
||||||
' lo aggiungo a lista pezzi
|
|
||||||
Dim sFilePath As String = ""
|
|
||||||
EgtGetInfo(m_nImportedPartId, FILE_PATH, sFilePath)
|
|
||||||
EgtSetInfo(nPartId, FILE_PATH, sFilePath)
|
|
||||||
EgtSetInfo(nPartId, "PartOnTable", 1)
|
|
||||||
Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, PrintSolidEntity.nId, nOriginalPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
|
|
||||||
Map.refTopPanelVM.PartList.Add(NewPart)
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
'EgtAddMachGroup("3dPrint")
|
|
||||||
'EgtSetTable("Tab")
|
|
||||||
|
|
||||||
'Dim nRawId As Integer = EgtAddRawPart(b3PrintSolid.Min, b3PrintSolid.DimX, b3PrintSolid.DimY, b3PrintSolid.DimZ, New Color3d(128, 128, 128, 30))
|
|
||||||
'EgtAddPartToRawPart(nPartId, b3PrintSolid.Min, nRawId)
|
|
||||||
'EgtMoveToCornerRawPart(nRawId, New Point3d(dPosX, dPosY, 0), MCH_CR.BL)
|
|
||||||
|
|
||||||
'EgtResetCurrMachGroup()
|
|
||||||
|
|
||||||
' seleziono ultimo pezzo aggiunto
|
|
||||||
Map.refTopPanelVM.SelLastPart()
|
|
||||||
' elimino vecchio pezzo d'importazione
|
|
||||||
EgtErase(m_nImportedPartId)
|
|
||||||
|
|
||||||
EgtDraw()
|
|
||||||
' ripristino modalita' standard
|
|
||||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' Ok
|
|
||||||
|
|
||||||
#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()
|
|
||||||
' elimino pezzo importato
|
|
||||||
EgtErase(m_nImportedPartId)
|
|
||||||
EgtDraw()
|
|
||||||
' se ci sono pezzi
|
|
||||||
If Map.refTopPanelVM.PartList.Count > 0 Then
|
|
||||||
' ripristino modalita' standard
|
|
||||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
|
||||||
Else
|
|
||||||
Map.refTopPanelVM.SelPage = Pages.NULL
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' Cancel
|
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,231 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class GeomEntity
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
Private m_bIsSelected As Boolean
|
|
||||||
Public Property bIsSelected As Boolean
|
|
||||||
Get
|
|
||||||
Return m_bIsSelected
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_bIsSelected = value
|
|
||||||
' seleziono in scena
|
|
||||||
EgtDeselectAll()
|
|
||||||
If Not IsNothing(value) Then
|
|
||||||
EgtSelectObj(m_nId)
|
|
||||||
End If
|
|
||||||
EgtDraw()
|
|
||||||
' segno come elemento selezionato in treeview
|
|
||||||
Map.refImportPanelVM.SetSelGeomEntity(Me)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_nId As Integer = GDB_ID.NULL
|
|
||||||
Public ReadOnly Property nId As Integer
|
|
||||||
Get
|
|
||||||
Return m_nId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_sName As String
|
|
||||||
Public ReadOnly Property sName As String
|
|
||||||
Get
|
|
||||||
Return m_sName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property ghName As String
|
|
||||||
Get
|
|
||||||
Return m_nId & If(Not String.IsNullOrWhiteSpace(m_sName), " - " & m_sName, "")
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_Reference As ChooseReferenceWndVM.References = ChooseReferenceWndVM.References.BL
|
|
||||||
Public Property Reference As ChooseReferenceWndVM.References
|
|
||||||
Get
|
|
||||||
Return m_Reference
|
|
||||||
End Get
|
|
||||||
Set(value As ChooseReferenceWndVM.References)
|
|
||||||
m_Reference = value
|
|
||||||
NotifyPropertyChanged(NameOf(ghReference))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property ghReference As String
|
|
||||||
Get
|
|
||||||
Select Case m_Reference
|
|
||||||
Case ChooseReferenceWndVM.References.TL
|
|
||||||
Return "┌"
|
|
||||||
Case ChooseReferenceWndVM.References.TR
|
|
||||||
Return "┐"
|
|
||||||
Case ChooseReferenceWndVM.References.BL
|
|
||||||
Return "└"
|
|
||||||
Case ChooseReferenceWndVM.References.BR
|
|
||||||
Return "┘"
|
|
||||||
Case ChooseReferenceWndVM.References.TC
|
|
||||||
Return "┬"
|
|
||||||
Case ChooseReferenceWndVM.References.ML
|
|
||||||
Return "├"
|
|
||||||
Case ChooseReferenceWndVM.References.MR
|
|
||||||
Return "┤"
|
|
||||||
Case ChooseReferenceWndVM.References.BC
|
|
||||||
Return "┴"
|
|
||||||
Case ChooseReferenceWndVM.References.MC
|
|
||||||
Return "┼"
|
|
||||||
Case Else
|
|
||||||
Return "X"
|
|
||||||
End Select
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' Definizione comandi
|
|
||||||
Private m_cmdImportedEntity As ICommand
|
|
||||||
|
|
||||||
Sub New(nId As Integer, sName As String)
|
|
||||||
m_nId = nId
|
|
||||||
m_sName = sName
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
|
||||||
|
|
||||||
#Region "ImportedEntity"
|
|
||||||
|
|
||||||
Public ReadOnly Property ImportedEntity_DoubleClick As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdImportedEntity Is Nothing Then
|
|
||||||
m_cmdImportedEntity = New Command(AddressOf ImportedEntity)
|
|
||||||
End If
|
|
||||||
Return m_cmdImportedEntity
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Sub ImportedEntity()
|
|
||||||
If Not IsNothing(Map.refImportPanelVM.SelImportLayer) Then
|
|
||||||
Map.refImportPanelVM.ImportedEntityList.Remove(Me)
|
|
||||||
Map.refImportPanelVM.SelImportLayer.EntityList.Add(Me)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' ImportedEntity
|
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class ImportPart
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
Private m_bIsSelected As Boolean
|
|
||||||
Public Property bIsSelected As Boolean
|
|
||||||
Get
|
|
||||||
Return m_bIsSelected
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_bIsSelected = value
|
|
||||||
Map.refImportPanelVM.SetSelImportPart(Me)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_nId As Integer
|
|
||||||
Public ReadOnly Property nId As Integer
|
|
||||||
Get
|
|
||||||
Return m_nId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_sName As String
|
|
||||||
Public Property sName As String
|
|
||||||
Get
|
|
||||||
Return m_sName
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_sName = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property ghName As String
|
|
||||||
Get
|
|
||||||
Return If(Not String.IsNullOrWhiteSpace(m_sName), m_nId & " - " & m_sName, "Part" & m_nId)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_LayerList As New ObservableCollection(Of ImportLayer)
|
|
||||||
Public ReadOnly Property LayerList As ObservableCollection(Of ImportLayer)
|
|
||||||
Get
|
|
||||||
Return m_LayerList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Sub New()
|
|
||||||
m_nId = If(Map.refImportPanelVM.ImportPartList.Count = 0, 1, Map.refImportPanelVM.ImportPartList.Max(Function(x) x.m_nId) + 1)
|
|
||||||
m_LayerList.Add(New ImportLayer(ImportLayer.LayerType.PRINT_SOLID, "Print"))
|
|
||||||
m_LayerList.Add(New ImportLayer(ImportLayer.LayerType.MACH_START, "Layer Start"))
|
|
||||||
'm_LayerList.Add(New ImportLayer(ImportLayer.LayerType.ORIGINAL_SOLID, "Original Solid"))
|
|
||||||
m_LayerList.Add(New ImportLayer(ImportLayer.LayerType.RIBS, "Ribs"))
|
|
||||||
m_LayerList.Add(New ImportLayer(ImportLayer.LayerType.SHELL_NUMBER, "Reduce Shell Number"))
|
|
||||||
m_LayerList.Add(New ImportLayer(ImportLayer.LayerType.AUX_SOLIDS, "Filled Solids"))
|
|
||||||
m_LayerList.Add(New ImportLayer(ImportLayer.LayerType.OTHERS, "Others"))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class ImportLayer
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
Public Enum LayerType As Integer
|
|
||||||
PRINT_SOLID = 1
|
|
||||||
MACH_START = 2
|
|
||||||
RIBS = 3
|
|
||||||
SHELL_NUMBER = 4
|
|
||||||
AUX_SOLIDS = 5
|
|
||||||
OTHERS = 7
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Private m_bIsSelected As Boolean
|
|
||||||
Public Property bIsSelected As Boolean
|
|
||||||
Get
|
|
||||||
Return m_bIsSelected
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_bIsSelected = value
|
|
||||||
Map.refImportPanelVM.SetSelImportLayer(Me)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_Type As LayerType
|
|
||||||
Public Property Type As LayerType
|
|
||||||
Get
|
|
||||||
Return m_Type
|
|
||||||
End Get
|
|
||||||
Set(value As LayerType)
|
|
||||||
m_Type = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_sName As String
|
|
||||||
Public Property sName As String
|
|
||||||
Get
|
|
||||||
Return m_sName
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_sName = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_EntityList As New ObservableCollection(Of GeomEntity)
|
|
||||||
Public Property EntityList As ObservableCollection(Of GeomEntity)
|
|
||||||
Get
|
|
||||||
Return m_EntityList
|
|
||||||
End Get
|
|
||||||
Set(value As ObservableCollection(Of GeomEntity))
|
|
||||||
m_EntityList = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Sub New(Type As LayerType, sName As String)
|
|
||||||
m_Type = Type
|
|
||||||
m_sName = sName
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<UserControl x:Class="ImportSceneHostV"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:EgtUILib="clr-namespace:EgtUILib;assembly=EgtUILib">
|
|
||||||
|
|
||||||
<WindowsFormsHost>
|
|
||||||
<EgtUILib:Scene x:Name="MainScene"/>
|
|
||||||
</WindowsFormsHost>
|
|
||||||
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
Imports System.Windows.Interop
|
|
||||||
Imports System.IO
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class ImportSceneHostV
|
|
||||||
|
|
||||||
Private m_ImportSceneHostVM As ImportSceneHostVM
|
|
||||||
|
|
||||||
Sub New()
|
|
||||||
' This call is required by the designer.
|
|
||||||
InitializeComponent()
|
|
||||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
|
||||||
Me.DataContext = New ImportSceneHostVM
|
|
||||||
m_ImportSceneHostVM = DirectCast(Me.DataContext, ImportSceneHostVM)
|
|
||||||
m_ImportSceneHostVM.SetMainScene(MainScene)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub MainScene_GotFocus() Handles MainScene.GotFocus
|
|
||||||
m_ImportSceneHostVM.SetIsFocused(True)
|
|
||||||
EgtOutLog("MainScene_GotFocus")
|
|
||||||
' Map.refSecondaryWindowV.Topmost = True
|
|
||||||
'Map.refSecondaryWindowVM.SetVisibility(True)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub MainScene_LostFocus() Handles MainScene.LostFocus
|
|
||||||
m_ImportSceneHostVM.SetIsFocused(False)
|
|
||||||
EgtOutLog("MainScene_LostFocus")
|
|
||||||
' Map.refSecondaryWindowV.Topmost = False
|
|
||||||
'Map.refSecondaryWindowVM.SetVisibility(False)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,722 +0,0 @@
|
|||||||
Imports System.IO
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
Imports Microsoft.Win32
|
|
||||||
|
|
||||||
Public Class ImportSceneHostVM
|
|
||||||
Inherits EgtWPFLib5.SceneHostVM
|
|
||||||
|
|
||||||
Friend m_bIsFocused As Boolean
|
|
||||||
Friend Sub SetIsFocused(bValue As Boolean)
|
|
||||||
m_bIsFocused = bValue
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' Identificativi per pezzo da selezionare/deselezionare
|
|
||||||
Private m_nIdToSel As Integer = GDB_ID.NULL
|
|
||||||
Private m_nIdToDesel As Integer = GDB_ID.NULL
|
|
||||||
' Dati movimento
|
|
||||||
Private m_dMaxStep As Double = 0
|
|
||||||
' Dati per Drag
|
|
||||||
Private m_nRestRadius As Integer = 5
|
|
||||||
Private m_bDrag As Boolean = False
|
|
||||||
Private m_bDragToStart As Boolean = False
|
|
||||||
Private m_bVerify As Boolean = False
|
|
||||||
Private m_bFromParking As Boolean = False
|
|
||||||
Private m_bDragging As Boolean = False
|
|
||||||
Private m_locPrev As System.Drawing.Point
|
|
||||||
Private m_ptPrev As Point3d
|
|
||||||
Private m_vtTotMove As Vector3d
|
|
||||||
Private m_dSnapDist As Double = 0
|
|
||||||
|
|
||||||
Private bReducedCut As Boolean = False
|
|
||||||
Private m_bMagnetic As Boolean
|
|
||||||
|
|
||||||
' punto di snap per inizializzazione
|
|
||||||
Private m_SnapType As SP
|
|
||||||
Friend ReadOnly Property SnapType As SP
|
|
||||||
Get
|
|
||||||
Return m_SnapType
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
|
||||||
|
|
||||||
Sub New()
|
|
||||||
MyBase.New()
|
|
||||||
AddHandler MainController.OnNewProject, AddressOf OnNewProject
|
|
||||||
AddHandler MainController.OnOpenProject, AddressOf OnOpenProject
|
|
||||||
AddHandler MainController.OnSavingProject, AddressOf OnSavingProject
|
|
||||||
AddHandler MainController.OnSavedProject, AddressOf OnSavedProject
|
|
||||||
AddHandler MainController.OnInsertedProject, AddressOf OnInsertedProject
|
|
||||||
AddHandler MainController.OnImportingProject, AddressOf OnImportingProject
|
|
||||||
AddHandler MainController.OnImportedProject, AddressOf OnImportedProject
|
|
||||||
AddHandler MainController.PrepareInputBox, AddressOf PrepareInputBox
|
|
||||||
AddHandler MainController.SetInputBoxText, AddressOf SetInputBoxText
|
|
||||||
AddHandler MainController.SetInputBoxCheck, AddressOf SetInputBoxCheck
|
|
||||||
AddHandler MainController.AddInputBoxCombo, AddressOf AddInputBoxCombo
|
|
||||||
AddHandler MainController.UpdateUI, AddressOf UpdateUI
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
Overrides Sub InitScene()
|
|
||||||
InitSceneEvents()
|
|
||||||
' Inizializzazione Scena
|
|
||||||
PreInitializeScene()
|
|
||||||
' Se tutto bene
|
|
||||||
If MainScene.Init() And Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT._3DPRINT) Then
|
|
||||||
PostInitializeScene()
|
|
||||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
|
||||||
MainScene.SetStatusNull()
|
|
||||||
EgtSetCurrentContext(MainScene.GetCtx())
|
|
||||||
' inizializzo gestore lavorazioni
|
|
||||||
EgtInitMachMgr(Map.refMainWindowVM.MainWindowM.sMachinesRoot, Map.refMainWindowVM.MainWindowM.sToolMakersDir)
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
' Problemi
|
|
||||||
' Se manca la chiave
|
|
||||||
If Map.refMainWindowVM.MainWindowM.nKeyLevel = -1 Or Map.refMainWindowVM.MainWindowM.nKeyLevel = -2 Then
|
|
||||||
EgtOutLog("Missing Dongle")
|
|
||||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
|
||||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
|
||||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
|
||||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
|
||||||
' Altrimenti manca la licenza
|
|
||||||
Else
|
|
||||||
EgtOutLog("Problems with Licence")
|
|
||||||
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
|
||||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
|
|
||||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
|
||||||
If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
|
||||||
' Apro dialogo per richiesta file licenza
|
|
||||||
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
|
|
||||||
.DefaultExt = ".lic",
|
|
||||||
.Filter = "Licences (.lic)|*.lic",
|
|
||||||
.CheckFileExists = True,
|
|
||||||
.ValidateNames = True
|
|
||||||
}
|
|
||||||
If LicDlg.ShowDialog() = True 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
|
|
||||||
End Try
|
|
||||||
End If
|
|
||||||
' Imposto il nuovo file di licenza nell'Ini
|
|
||||||
WriteMainPrivateProfileString(S_GENERAL, K_LICENCE, LicDlg.SafeFileName)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
' Chiudo il programma
|
|
||||||
End
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Sub InitSceneEvents()
|
|
||||||
AddHandler MainScene.OnCursorPos, AddressOf OnCursorPos
|
|
||||||
AddHandler MainScene.OnMouseSetObjFilterForSelect, AddressOf OnMouseSetObjFilterForSelect
|
|
||||||
AddHandler MainScene.OnMouseSelectedAll, AddressOf OnMouseSelectedAll
|
|
||||||
AddHandler MainScene.OnMouseDeselectedAll, AddressOf OnMouseDeselectedAll
|
|
||||||
AddHandler MainScene.OnMouseDownScene, AddressOf OnMouseDownScene
|
|
||||||
AddHandler MainScene.OnMouseMoveScene, AddressOf OnMouseMoveScene
|
|
||||||
AddHandler MainScene.OnMouseUpScene, AddressOf OnMouseUpScene
|
|
||||||
AddHandler MainScene.OnMouseSelectedObj, AddressOf OnMouseSelectedObj
|
|
||||||
AddHandler MainScene.OnMouseSelectedPart, AddressOf OnMouseSelectedPart
|
|
||||||
AddHandler MainScene.OnMouseSelectedLayer, AddressOf OnMouseSelectedLayer
|
|
||||||
AddHandler MainScene.OnMouseSelectedPath, AddressOf OnMouseSelectedPath
|
|
||||||
AddHandler MainScene.OnMousePointFromSelection, AddressOf OnMousePointFromSelection
|
|
||||||
AddHandler MainScene.OnMouseDone, AddressOf OnMouseDone
|
|
||||||
AddHandler MainScene.OnMouseSelectedPoint, AddressOf OnMouseSelectedPoint
|
|
||||||
AddHandler MainScene.OnMouseSelectedDir, AddressOf OnMouseSelectedDir
|
|
||||||
AddHandler MainScene.OnMouseMoveSelPoint, AddressOf OnMouseMoveSelPoint
|
|
||||||
AddHandler MainScene.OnShowDistance, AddressOf OnShowDistance
|
|
||||||
AddHandler MainScene.KeyDown, AddressOf OnKeyDown
|
|
||||||
AddHandler MainScene.OnCloseGetDist, AddressOf OnCloseGetDist
|
|
||||||
AddHandler MainScene.OnChangedSnapPointType, AddressOf OnChangedSnapPointType
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub PreInitializeScene()
|
|
||||||
' imposto colore di default
|
|
||||||
Dim DefColor As New Color3d(0, 0, 0)
|
|
||||||
GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
|
||||||
MainScene.SetDefaultMaterial(DefColor)
|
|
||||||
' imposto colori sfondo
|
|
||||||
Dim BackTopColor As New Color3d(192, 192, 192)
|
|
||||||
GetMainPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
|
|
||||||
Dim BackBotColor As New Color3d(BackTopColor)
|
|
||||||
GetMainPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
|
|
||||||
MainScene.SetViewBackground(BackTopColor, BackBotColor)
|
|
||||||
' imposto spessore linee
|
|
||||||
Dim nLineWidth As Integer = 1
|
|
||||||
nLineWidth = GetMainPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth)
|
|
||||||
MainScene.SetLineWidth(nLineWidth)
|
|
||||||
' imposto colore di evidenziazione
|
|
||||||
Dim MarkColor As New Color3d(255, 255, 0)
|
|
||||||
GetMainPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
|
|
||||||
MainScene.SetMarkMaterial(MarkColor)
|
|
||||||
' imposto colore per superfici selezionate
|
|
||||||
Dim SelSurfColor As New Color3d(255, 255, 192)
|
|
||||||
GetMainPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
|
|
||||||
MainScene.SetSelSurfMaterial(SelSurfColor)
|
|
||||||
' imposto tipo e colore del rettangolo di zoom
|
|
||||||
Dim bOutline As Boolean = True
|
|
||||||
Dim ZwColor As New Color3d(0, 0, 0)
|
|
||||||
GetMainPrivateProfileZoomWin(S_SCENE, K_ZOOMWIN, bOutline, ZwColor)
|
|
||||||
MainScene.SetZoomWinAttribs(bOutline, ZwColor)
|
|
||||||
' imposto colore della linea di distanza
|
|
||||||
Dim DstLnColor As New Color3d(255, 0, 0)
|
|
||||||
GetMainPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor)
|
|
||||||
MainScene.SetDistLineMaterial(DstLnColor)
|
|
||||||
' imposto parametri OpenGL
|
|
||||||
Dim nDriver As Integer = GetMainPrivateProfileInt(S_OPENGL, K_DRIVER, 3)
|
|
||||||
Dim b2Buff As Boolean = (GetMainPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1) <> 0)
|
|
||||||
Dim nColorBits As Integer = GetMainPrivateProfileInt(S_OPENGL, K_COLORBITS, 32)
|
|
||||||
Dim nDepthBits As Integer = GetMainPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32)
|
|
||||||
MainScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub PostInitializeScene()
|
|
||||||
' Impostazioni Controller
|
|
||||||
MainController.SetScene(MainScene)
|
|
||||||
MainController.SetSurfTmTolerance(0.05)
|
|
||||||
MainController.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS)
|
|
||||||
' imposto unità di misura per interfaccia utente
|
|
||||||
Dim nMeasureUnit As Integer = GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1)
|
|
||||||
EgtSetUiUnits(nMeasureUnit <> 0)
|
|
||||||
'Map.refMyStatusBarVM.SetMeasureUnit(nMeasureUnit <> 0)
|
|
||||||
' imposto visualizzazione riferimento globale
|
|
||||||
EgtSetGlobFrameShow(True)
|
|
||||||
' imposto i dati della griglia
|
|
||||||
'LoadGridData()
|
|
||||||
EgtSetGridFrame(Frame3d.GLOB)
|
|
||||||
EgtSetGridGeo(10, 10, 100, 484)
|
|
||||||
EgtSetGridColor(New Color3d(160, 160, 160), New Color3d(160, 160, 160))
|
|
||||||
EgtSetGridShow(True, False)
|
|
||||||
' imposto tipo coordinate
|
|
||||||
MainScene.SetGridCursorPos(True)
|
|
||||||
' modo di visualizzazione
|
|
||||||
Dim nShowMode As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
|
|
||||||
'''Map.refShowPanelVM.SetShowMode(DirectCast(nShowMode, SM))
|
|
||||||
' visualizzazione avanzata dei triangoli costituenti le superfici
|
|
||||||
Dim bShowTriaAdv As Boolean = (GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
|
|
||||||
EgtSetShowTriaAdv(bShowTriaAdv)
|
|
||||||
' tipo visualizzazione per Zmap
|
|
||||||
Dim nShowZmap As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWZMAP, 1)
|
|
||||||
EgtSetShowZmap(DirectCast(nShowZmap, ZSM), False)
|
|
||||||
' dimensione lineare max in pixel delle textures
|
|
||||||
Dim nTxrMaxLinPix As Integer = GetMainPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096)
|
|
||||||
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
|
||||||
' tipo snap point
|
|
||||||
MainScene.SetSnapPointType(SP.PT_SKETCH)
|
|
||||||
' visualizzazione assemblato
|
|
||||||
Dim nShowBuilding As Boolean = GetMainPrivateProfileInt(S_SCENE, K_SHOWBUILDING, 0) <> 0
|
|
||||||
'''Map.refShowBeamPanelVM.SetShowBuilding(nShowBuilding)
|
|
||||||
' nascondo input box
|
|
||||||
'''Map.refFreeContourInputVM.ResetInputBox()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
#Region "ProjectManager"
|
|
||||||
|
|
||||||
Public Overrides Sub NewProject()
|
|
||||||
EgtSetCurrentContext(MainScene.GetCtx())
|
|
||||||
Dim bOk As Boolean = MainController.NewProject()
|
|
||||||
MainScene.SetStatusNull()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Sub OpenProject(sFilePath As String)
|
|
||||||
EgtSetCurrentContext(MainScene.GetCtx())
|
|
||||||
Dim bOk As Boolean = False
|
|
||||||
If String.IsNullOrEmpty(sFilePath) Then
|
|
||||||
' Recupero cartella dell'ultimo progetto aperto
|
|
||||||
Dim sDir As String = MainController.GetCurrFile()
|
|
||||||
If String.IsNullOrWhiteSpace(sDir) Then
|
|
||||||
GetMainPrivateProfileString(S_MRUFILES, K_FILE, "", sDir)
|
|
||||||
End If
|
|
||||||
If Not String.IsNullOrWhiteSpace(sDir) Then
|
|
||||||
sDir = Path.GetDirectoryName(sDir)
|
|
||||||
End If
|
|
||||||
bOk = MainController.OpenProject(sDir)
|
|
||||||
Else
|
|
||||||
bOk = MainController.OpenProject(sFilePath, False)
|
|
||||||
End If
|
|
||||||
MainScene.SetStatusNull()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Sub SaveProject()
|
|
||||||
MyBase.SaveProject()
|
|
||||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
|
||||||
MainScene.SetStatusNull()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Sub SaveAsProject()
|
|
||||||
MyBase.SaveAsProject()
|
|
||||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
|
||||||
MainScene.SetStatusNull()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Sub InsertProject()
|
|
||||||
' eseguo
|
|
||||||
Dim sDir As String = String.Empty
|
|
||||||
GetMainPrivateProfileString(S_MRUIMPORT, K_FILE & "1", "", sDir)
|
|
||||||
Dim OpenFileDialog As New OpenFileDialog With {.Title = "Insert",
|
|
||||||
.Filter = "Stereolithography (*.stl)|*.stl" &
|
|
||||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
|
||||||
"|All Files (*.*)|*.*",
|
|
||||||
.FilterIndex = 1,
|
|
||||||
.InitialDirectory = sDir}
|
|
||||||
If Not OpenFileDialog.ShowDialog Then
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
Dim sFile As String = String.Empty
|
|
||||||
sFile = OpenFileDialog.FileName
|
|
||||||
Dim ChooseReferenceWndVM As New ChooseReferenceWndVM
|
|
||||||
Dim ChooseReferenceWndV As New ChooseReferenceWndV(Application.Current.MainWindow, ChooseReferenceWndVM)
|
|
||||||
If Not ChooseReferenceWndV.ShowDialog() Then Return
|
|
||||||
|
|
||||||
Dim nImportContext As Integer = EgtInitContext()
|
|
||||||
MainController.InsertProject(sFile, False)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Sub ImportProject()
|
|
||||||
Dim sDir As String = String.Empty
|
|
||||||
GetMainPrivateProfileString(S_MRUIMPORT, K_FILE & "1", "", sDir)
|
|
||||||
If Not String.IsNullOrWhiteSpace(sDir) Then
|
|
||||||
sDir = Path.GetDirectoryName(sDir)
|
|
||||||
End If
|
|
||||||
sDir.TrimEnd("\"c)
|
|
||||||
MainController.ImportProject(sDir)
|
|
||||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
|
||||||
MainScene.SetStatusNull()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub PreExecScript(bScriptInMru As Boolean)
|
|
||||||
'm_bScriptInMru = bScriptInMru
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub ExecScript(sFilePath As String)
|
|
||||||
If String.IsNullOrEmpty(sFilePath) Then
|
|
||||||
Dim sDir As String = String.Empty
|
|
||||||
'GetMainPrivateProfileString(S_GENERAL, K_LASTLUADIR, "", sDir)
|
|
||||||
MainController.Exec(sDir)
|
|
||||||
Else
|
|
||||||
MainController.Exec(sFilePath, False)
|
|
||||||
End If
|
|
||||||
Dim bMachiningMode As Boolean = EgtGetCurrMachGroup() <> GDB_ID.NULL
|
|
||||||
If Not bMachiningMode And EgtGetCurrLayer() = GDB_ID.NULL Then
|
|
||||||
Dim nCurrPart As Integer = EgtGetCurrPart()
|
|
||||||
If nCurrPart = GDB_ID.NULL Or Not EgtSetCurrPartLayer(nCurrPart, EgtGetFirstLayer(nCurrPart, True)) Then
|
|
||||||
EgtResetCurrPartLayer()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' ProjectManager
|
|
||||||
|
|
||||||
#Region "SCENE EVENTS"
|
|
||||||
|
|
||||||
Private Sub OnCursorPos(ByVal sender As Object, ByVal sCursorPos As String)
|
|
||||||
Map.refMyStatusBarVM.SetCurrPos(sCursorPos)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseSetObjFilterForSelect(sender As Object, bZeroDim As Boolean, bCurve As Boolean,
|
|
||||||
bSurf As Boolean, bVolume As Boolean, bExtra As Boolean)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseSelectedAll(ByVal sender As Object, bOnlyVisble As Boolean)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseDeselectedAll(ByVal sender As Object)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseDownScene(sender As Object, e As Forms.MouseEventArgs)
|
|
||||||
If e.Button = Forms.MouseButtons.Middle Then Return
|
|
||||||
If Map.refInstrumentPanelVM.GetDistIsChecked Then Return
|
|
||||||
Basic_OnMouseDownScene(sender, e)
|
|
||||||
'Select Case Map.refMainMenuVM.SelPage
|
|
||||||
' Case Pages.VIEW
|
|
||||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
|
||||||
' If Map.refFreeContourManagerVM.bIsActive Then Return
|
|
||||||
' If Map.refShowBeamPanelVM.bShowAll Then
|
|
||||||
' View_Part_OnMouseDownScene(sender, e)
|
|
||||||
' Else
|
|
||||||
' View_Feature_OnMouseDownScene(sender, e)
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Case Pages.MACHINING
|
|
||||||
' If Not IsNothing(Map.refMachGroupPanelVM) AndAlso Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then
|
|
||||||
' Dim SelectedMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
|
||||||
' If EgtGetCurrMachGroup() = GDB_ID.NULL Then Return
|
|
||||||
' If SelectedMachGroup.nType = BWType.BEAM Then
|
|
||||||
' Beam_OnMouseDownScene(sender, e)
|
|
||||||
' ElseIf SelectedMachGroup.nType = BWType.WALL Then
|
|
||||||
' Wall_OnMouseDownScene(sender, e)
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseMoveScene(sender As Object, e As Forms.MouseEventArgs)
|
|
||||||
If e.Button = Forms.MouseButtons.Middle Then Return
|
|
||||||
If Map.refInstrumentPanelVM.GetDistIsChecked Then Return
|
|
||||||
Basic_OnMouseMoveScene(sender, e)
|
|
||||||
'Select Case Map.refMainMenuVM.SelPage
|
|
||||||
' Case Pages.VIEW
|
|
||||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
|
||||||
' If Map.refFreeContourManagerVM.bIsActive Then Return
|
|
||||||
' If Map.refShowBeamPanelVM.bShowAll Then
|
|
||||||
' View_Part_OnMouseMoveScene(sender, e)
|
|
||||||
' Else
|
|
||||||
' View_Feature_OnMouseMoveScene(sender, e)
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Case Pages.MACHINING
|
|
||||||
' If Not IsNothing(Map.refMachGroupPanelVM) AndAlso Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then
|
|
||||||
' Dim SelectedMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
|
||||||
' If EgtGetCurrMachGroup() = GDB_ID.NULL Then Return
|
|
||||||
' If SelectedMachGroup.nType = BWType.BEAM Then
|
|
||||||
' Beam_OnMouseMoveScene(sender, e)
|
|
||||||
' ElseIf SelectedMachGroup.nType = BWType.WALL Then
|
|
||||||
' Wall_OnMouseMoveScene(sender, e)
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseUpScene(sender As Object, e As Forms.MouseEventArgs)
|
|
||||||
If e.Button = Forms.MouseButtons.Middle Then Return
|
|
||||||
If Map.refInstrumentPanelVM.GetDistIsChecked Then Return
|
|
||||||
Basic_OnMouseUpScene(sender, e)
|
|
||||||
'Select Case Map.refMainMenuVM.SelPage
|
|
||||||
' Case Pages.VIEW
|
|
||||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
|
||||||
' If Map.refFreeContourManagerVM.bIsActive Then Return
|
|
||||||
' If Map.refShowBeamPanelVM.bShowAll Then
|
|
||||||
' View_Part_OnMouseUpScene(sender, e)
|
|
||||||
' Else
|
|
||||||
' View_Feature_OnMouseUpScene(sender, e)
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Case Pages.MACHINING
|
|
||||||
' If Not IsNothing(Map.refMachGroupPanelVM) AndAlso Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then
|
|
||||||
' Dim SelectedMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
|
||||||
' If EgtGetCurrMachGroup() = GDB_ID.NULL Then Return
|
|
||||||
' If SelectedMachGroup.nType = BWType.BEAM Then
|
|
||||||
' Beam_OnMouseUpScene(sender, e)
|
|
||||||
' ElseIf SelectedMachGroup.nType = BWType.WALL Then
|
|
||||||
' Wall_OnMouseUpScene(sender, e)
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseSelectedObj(ByVal sender As Object, ByVal nId As Integer, ByVal bLast As Boolean)
|
|
||||||
'' Se in modalità edit L250
|
|
||||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
|
|
||||||
' ' se sto editando testo angoli
|
|
||||||
' If Map.refFreeContourManagerVM.bIsModifyingTextAngle Then
|
|
||||||
' ' passo testo selezionato
|
|
||||||
' Map.refFreeContourManagerVM.TextAngleSelected(nId)
|
|
||||||
' End If
|
|
||||||
' MainController.MouseSelectedObj(nId, bLast)
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseSelectedPart(ByVal sender As Object, ByVal nId As Integer)
|
|
||||||
'' Se in modalità edit L250
|
|
||||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
|
|
||||||
' MainController.MouseSelectedPart(nId)
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseSelectedLayer(ByVal sender As Object, ByVal nId As Integer)
|
|
||||||
'' Se in modalità edit L250
|
|
||||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
|
|
||||||
' MainController.MouseSelectedLayer(nId)
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseSelectedPath(ByVal sender As Object, ByVal nId As Integer, ByVal bHaltOnFork As Boolean)
|
|
||||||
'' Se in modalità edit L250
|
|
||||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
|
|
||||||
' MainController.MouseSelectedPath(nId, bHaltOnFork)
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMousePointFromSelection(ByVal sender As Object, ByVal nId As Integer, ByVal PtP As Point3d, ByVal nAux As Integer)
|
|
||||||
'' Se in modalità edit L250
|
|
||||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
|
|
||||||
' MainController.SetPointFromSelection(nId, PtP, nAux)
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseDone(ByVal sender As Object)
|
|
||||||
'' Se in modalità edit L250
|
|
||||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
|
|
||||||
' MainController.Done(Map.refFreeContourInputVM.Text)
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseSelectedPoint(ByVal sender As Object, ByVal PtP As Point3d, ByVal nSep As SEP, ByVal nId As Integer)
|
|
||||||
'' Se in modalità edit L250
|
|
||||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
|
|
||||||
' Dim bDone As Boolean = (Keyboard.Modifiers And ModifierKeys.Control) <> ModifierKeys.Control
|
|
||||||
' MainController.MouseSelectedPoint(PtP, nSep, nId, bDone)
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseSelectedDir(ByVal sender As Object, ByVal VtDir As Vector3d)
|
|
||||||
'' Se in modalità edit L250
|
|
||||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
|
|
||||||
' MainController.SetLastVector3d(VtDir)
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnMouseMoveSelPoint(ByVal sender As Object, ByVal PtP As Point3d)
|
|
||||||
'' Se in modalità edit L250
|
|
||||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
|
|
||||||
' MainController.MouseMoveInSelectionPoint(PtP)
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnShowDistance(ByVal sender As Object, ByVal sDistance As String)
|
|
||||||
Map.refMyStatusBarVM.SetOutputMessage(sDistance)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnKeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs)
|
|
||||||
'' Se in modalità edit L250
|
|
||||||
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
|
|
||||||
' ' Con DEL eseguo cancellazione delle entità selezionate
|
|
||||||
' If e.KeyData = System.Windows.Forms.Keys.Delete Then
|
|
||||||
' MainController.SetLastInteger(GDB_ID.SEL)
|
|
||||||
' MainController.ExecuteCommand(Controller.CMD.DELETE)
|
|
||||||
' ' Con SPAZIO ripeto l'ultimo comando
|
|
||||||
' ElseIf e.KeyData = System.Windows.Forms.Keys.Space Then
|
|
||||||
' MainController.RepeatLastCommand()
|
|
||||||
' ' Con 'A' e in modalità continuazione, forzo il passaggio ad arco
|
|
||||||
' ElseIf e.KeyData = System.Windows.Forms.Keys.A And MainController.GetContinue() Then
|
|
||||||
' MainController.ContinueArcPDP()
|
|
||||||
' ' Con 'L' e in modalità continuazione, forzo il passaggio a retta
|
|
||||||
' ElseIf e.KeyData = System.Windows.Forms.Keys.L And MainController.GetContinue() Then
|
|
||||||
' MainController.ContinueLine2P()
|
|
||||||
' ' Con 'V' cambio lo stato del check
|
|
||||||
' ElseIf e.KeyData = System.Windows.Forms.Keys.V Then
|
|
||||||
' Map.refFreeContourInputVM.ChangeInputBoxCheck()
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnCloseGetDist(sender As System.Object)
|
|
||||||
Map.refInstrumentPanelVM.SetGetDistance_IsChecked(False)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub OnChangedSnapPointType(ByVal sender As Object, ByVal nSpType As SP, ByVal bUser As Boolean)
|
|
||||||
m_SnapType = nSpType
|
|
||||||
If Not IsNothing(Map.refMyStatusBarVM) Then Map.refMyStatusBarVM.SetSnapPointType(nSpType)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' SCENE EVENTS
|
|
||||||
|
|
||||||
#Region "CONTROLLER EVENTS"
|
|
||||||
|
|
||||||
Private Sub OnNewProject(sender As Object, bOk As Boolean)
|
|
||||||
CurrentMachine.CreateMachineTable()
|
|
||||||
If Not bOk Then
|
|
||||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
|
|
||||||
End If
|
|
||||||
EgtZoom(ZM.ALL)
|
|
||||||
MainScene.SetStatusNull()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnOpenProject(sender As Object, sFile As String, bOk As Boolean)
|
|
||||||
EgtZoom(ZM.ALL)
|
|
||||||
WriteMainPrivateProfileString(S_GENERAL, K_LASTNGEDIR, Path.GetDirectoryName(sFile))
|
|
||||||
If bOk Then
|
|
||||||
Map.refProjManagerVM.MruFiles.Add(sFile)
|
|
||||||
Else
|
|
||||||
Map.refProjManagerVM.MruFiles.Remove(sFile)
|
|
||||||
Dim sMsg As String
|
|
||||||
If My.Computer.FileSystem.FileExists(sFile) Then
|
|
||||||
sMsg = EgtMsg(10003) & " '" & sFile & "'" 'Error opening file
|
|
||||||
Else
|
|
||||||
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
|
|
||||||
End If
|
|
||||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
|
||||||
End If
|
|
||||||
MainScene.SetStatusNull()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnSavingProject(ByVal sender As Object, sFile As String)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnSavedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean)
|
|
||||||
WriteMainPrivateProfileString(S_GENERAL, K_LASTNGEDIR, Path.GetDirectoryName(sFile))
|
|
||||||
If bOk Then
|
|
||||||
Map.refProjManagerVM.MruFiles.Add(sFile)
|
|
||||||
Else
|
|
||||||
Map.refProjManagerVM.MruFiles.Remove(sFile)
|
|
||||||
Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
|
|
||||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnInsertedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean)
|
|
||||||
' Segnalo eventuale errore
|
|
||||||
If Not bOk Then
|
|
||||||
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
|
|
||||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
|
||||||
Else
|
|
||||||
' lo aggiungo alla lista pezzi
|
|
||||||
Map.refProjectVM.AddNewPart(sFile)
|
|
||||||
End If
|
|
||||||
EgtDraw()
|
|
||||||
MainScene.SetStatusNull()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnImportingProject(sender As Object, nType As Integer, ByRef nFlag As Integer)
|
|
||||||
If nType <> FT.NULL Then
|
|
||||||
If nType = FT.CNC Then
|
|
||||||
nFlag = GetMainPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE)
|
|
||||||
Else
|
|
||||||
nFlag = 0
|
|
||||||
End If
|
|
||||||
' Abilito progress e bottone stop
|
|
||||||
Map.refMyStatusBarVM.StartLoading("", True)
|
|
||||||
Else
|
|
||||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnImportedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean)
|
|
||||||
EgtZoom(ZM.ALL)
|
|
||||||
' Disabilito progress e bottone stop
|
|
||||||
Map.refMyStatusBarVM.EndLoading("")
|
|
||||||
' Salvo path
|
|
||||||
WriteMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, Path.GetDirectoryName(sFile))
|
|
||||||
' Segnalo eventuale errore
|
|
||||||
If Not bOk Then
|
|
||||||
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
|
|
||||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
|
||||||
ElseIf Path.GetExtension(sFile) <> ".cnc" Then
|
|
||||||
' creo oggetto pezzo in lista
|
|
||||||
'Map.refProjectVM.
|
|
||||||
End If
|
|
||||||
MainScene.SetStatusNull()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub PrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByVal sCheckLabel As String,
|
|
||||||
ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean)
|
|
||||||
'Map.refFreeContourInputVM.PrepareInputBox(sTitle, sLabel, sCheckLabel, bShowCombo, bShowBtn)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SetInputBoxText(ByVal sText As String)
|
|
||||||
'Map.refFreeContourInputVM.SetInputBoxText(sText)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SetInputBoxCheck(ByVal bCheck As Boolean)
|
|
||||||
'Map.refFreeContourInputVM.SetInputBoxCheck(bCheck)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub AddInputBoxCombo(ByVal sText As String, ByVal bSelected As Boolean)
|
|
||||||
'Map.refFreeContourInputVM.AddInputBoxCombo(sText, bSelected)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub UpdateUI(ByVal sender As Object, ByVal bReloadUI As Boolean)
|
|
||||||
'' pulisco input e relativi messaggi
|
|
||||||
'Map.refFreeContourInputVM.ResetInputBox()
|
|
||||||
If MainController.GetContinue() Then
|
|
||||||
Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(399)) ' Continue : 'L' with line, 'A' with arc
|
|
||||||
Else
|
|
||||||
Map.refMyStatusBarVM.ClearOutputMessage()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONTROLLER EVENTS
|
|
||||||
|
|
||||||
#Region "Part"
|
|
||||||
|
|
||||||
Friend Sub Basic_OnMouseDownScene(sender As Object, e As Forms.MouseEventArgs)
|
|
||||||
' Verifico se selezionato indicativo di pezzo
|
|
||||||
EgtSetObjFilterForSelWin(True, True, True, True, True)
|
|
||||||
Dim nSel As Integer
|
|
||||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
|
||||||
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
|
||||||
While nId <> GDB_ID.NULL
|
|
||||||
' Recupero l'identificativo del pezzo cui appartiene
|
|
||||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
|
|
||||||
Dim bFound As Boolean = False
|
|
||||||
If EgtIsPart(nPartId) Then bFound = True
|
|
||||||
If Not bFound Then
|
|
||||||
nId = EgtGetNextObjInSelWin()
|
|
||||||
Continue While
|
|
||||||
End If
|
|
||||||
Dim nStat As Integer = GDB_ST.ON_
|
|
||||||
EgtGetStatus(nPartId, nStat)
|
|
||||||
' Se già selezionato
|
|
||||||
If nStat = GDB_ST.SEL Then
|
|
||||||
' Memorizzo Id da deselezionare
|
|
||||||
m_nIdToDesel = nPartId
|
|
||||||
Else
|
|
||||||
' Memorizzo Id da selezionare
|
|
||||||
m_nIdToSel = nPartId
|
|
||||||
End If
|
|
||||||
Exit While
|
|
||||||
nId = EgtGetNextObjInSelWin()
|
|
||||||
End While
|
|
||||||
' Dati per drag
|
|
||||||
m_bDragToStart = True
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub Basic_OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
|
||||||
' Se drag non abilitato o già in esecuzione, esco
|
|
||||||
If Not m_bDragToStart Then Return
|
|
||||||
' Se primo movimento di drag, verifico di aver superato la soglia di movimento in pixel
|
|
||||||
If m_bDragToStart Then
|
|
||||||
If Math.Abs(e.Location.X - m_locPrev.X) < m_nRestRadius And
|
|
||||||
Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
m_bDragToStart = False
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub Basic_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
|
||||||
' Se eseguito drag
|
|
||||||
If Not m_bDragToStart Then
|
|
||||||
' Se selezione da eseguire
|
|
||||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
|
||||||
' Se pezzo da selezionare non è già selezionato
|
|
||||||
'If EgtIsSelectedObj(m_nIdToSel) Then
|
|
||||||
' Eseguo la selezione
|
|
||||||
Map.refProjectVM.SelPartFromId(m_nIdToSel)
|
|
||||||
'EgtDeselectAll()
|
|
||||||
'EgtSelectPartObjs(m_nIdToSel)
|
|
||||||
'EgtSelectObj(m_nIdToSel)
|
|
||||||
'EgtSetMark(m_nIdToSel)
|
|
||||||
'End If
|
|
||||||
'If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId <> m_nIdToSel Then
|
|
||||||
' ' Eseguo la selezione
|
|
||||||
' For Each BTLPart In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
|
||||||
' If BTLPart.nPartId = m_nIdToSel Then
|
|
||||||
' BTLPart.SetIsSelected(True)
|
|
||||||
' ElseIf BTLPart.IsSelected Then
|
|
||||||
' BTLPart.SetIsSelected(False)
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
' End If
|
|
||||||
End If
|
|
||||||
' Reset
|
|
||||||
m_bDrag = False
|
|
||||||
m_nIdToSel = GDB_ID.NULL
|
|
||||||
m_nIdToDesel = GDB_ID.NULL
|
|
||||||
EgtDraw()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' Part
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="ImportWndV"
|
|
||||||
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:local="clr-namespace:Icarus">
|
|
||||||
<DockPanel>
|
|
||||||
<Grid DockPanel.Dock="Left">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<ListBox ItemsSource="{Binding ImportedEntityList}"
|
|
||||||
SelectedItem="{Binding SelImportedEntity}"/>
|
|
||||||
<StackPanel Grid.Row="1"
|
|
||||||
Orientation="Horizontal">
|
|
||||||
<Button Content="+"
|
|
||||||
Command="{Binding AddPart_Command}"
|
|
||||||
Style="{StaticResource ToolBar_Button}"/>
|
|
||||||
<Button Content="-"
|
|
||||||
Command="{Binding RemovePart_Command}"
|
|
||||||
Style="{StaticResource ToolBar_Button}"/>
|
|
||||||
<Button Content="Ref"
|
|
||||||
Command="{Binding ChangeReference_Command}"
|
|
||||||
Style="{StaticResource ToolBar_Button}"/>
|
|
||||||
</StackPanel>
|
|
||||||
<ListBox Grid.Row="2"
|
|
||||||
ItemsSource="{Binding ImportPartList}"
|
|
||||||
SelectedItem="{Binding SelImportPartList}"/>
|
|
||||||
</Grid>
|
|
||||||
<!--<local:ImportSceneHostV/>-->
|
|
||||||
</DockPanel>
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
Public Class ImportWndV
|
|
||||||
|
|
||||||
Private WithEvents m_ImportWndVM As ImportWndVM
|
|
||||||
|
|
||||||
Sub New(Owner As Window, ImportWndVM As ImportWndVM)
|
|
||||||
MyBase.New(Owner)
|
|
||||||
' This call is required by the designer.
|
|
||||||
InitializeComponent()
|
|
||||||
Me.DataContext = ImportWndVM
|
|
||||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
|
||||||
m_ImportWndVM = ImportWndVM
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ImportWndVM.m_CloseWindow
|
|
||||||
' Me.DialogResult = bDialogResult
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
Imports EgtUILib
|
|
||||||
|
|
||||||
Public Class ImportWndVM
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
Private m_ImportedEntityList As ObservableCollection(Of GeomEntity)
|
|
||||||
Public ReadOnly Property ImportedEntityList As ObservableCollection(Of GeomEntity)
|
|
||||||
Get
|
|
||||||
Return m_ImportedEntityList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_SelImportedEntity As GeomEntity
|
|
||||||
Public Property SelImportedEntity As GeomEntity
|
|
||||||
Get
|
|
||||||
Return m_SelImportedEntity
|
|
||||||
End Get
|
|
||||||
Set(value As GeomEntity)
|
|
||||||
m_SelImportedEntity = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_ImportPartList As ObservableCollection(Of ImportPart)
|
|
||||||
Public ReadOnly Property ImportPartList As ObservableCollection(Of ImportPart)
|
|
||||||
Get
|
|
||||||
Return m_ImportPartList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_SelImportPartList As ImportPart
|
|
||||||
Public Property SelImportPartList As ImportPart
|
|
||||||
Get
|
|
||||||
Return m_SelImportPartList
|
|
||||||
End Get
|
|
||||||
Set(value As ImportPart)
|
|
||||||
m_SelImportPartList = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Sub New(sFilePath As String)
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class GeomEntity
|
|
||||||
|
|
||||||
Private m_nId As Integer = GDB_ID.NULL
|
|
||||||
Public ReadOnly Property nId As Integer
|
|
||||||
Get
|
|
||||||
Return m_nId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_sName As String
|
|
||||||
Public ReadOnly Property sName As String
|
|
||||||
Get
|
|
||||||
Return m_sName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class ImportPart
|
|
||||||
|
|
||||||
Private m_sName As String
|
|
||||||
Public Property sName As String
|
|
||||||
Get
|
|
||||||
Return m_sName
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_sName = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_LayerList As List(Of ImportLayer)
|
|
||||||
Public ReadOnly Property LayerList As List(Of ImportLayer)
|
|
||||||
Get
|
|
||||||
Return m_LayerList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class ImportLayer
|
|
||||||
|
|
||||||
Private m_sName As String
|
|
||||||
Public Property sName As String
|
|
||||||
Get
|
|
||||||
Return m_sName
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_sName = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_EntityList As List(Of GeomEntity)
|
|
||||||
Public ReadOnly Property EntityList As List(Of GeomEntity)
|
|
||||||
Get
|
|
||||||
Return m_EntityList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,14 +1,30 @@
|
|||||||
<EgtFloating:EgtFloatingPanel x:Class="InstrumentPanelV"
|
<StackPanel x:Class="InstrumentPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
xmlns:local="clr-namespace:Icarus"
|
||||||
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
|
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
|
||||||
<ToggleButton ToolTip="{Binding GetDistToolTip}"
|
<local:CheckedImageToggleButton ToolTip="{Binding GetDist_ToolTip}"
|
||||||
Style="{StaticResource ToolBar_ToggleButton}"
|
IsChecked="{Binding GetDistIsChecked}"
|
||||||
IsChecked="{Binding GetDistIsChecked}">
|
ImageSource="/Resources/InstrumentPanel/GetDist.png"
|
||||||
<Image Source="/Resources/InstrumentPanel/GetDist.png" Stretch="Uniform"/>
|
CheckedImageSource="/Resources/InstrumentPanel/GetDist_White.png"
|
||||||
</ToggleButton>
|
Width="15"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
</EgtFloating:EgtFloatingPanel>
|
Style="{StaticResource BottomPanel_ToggleButton}">
|
||||||
|
<local:CheckedImageToggleButton.Resources>
|
||||||
|
<sys:Double x:Key="ToggleButton.Image.Height">25</sys:Double>
|
||||||
|
<sys:Double x:Key="ToggleButton.Image.Width">25</sys:Double>
|
||||||
|
</local:CheckedImageToggleButton.Resources>
|
||||||
|
</local:CheckedImageToggleButton>
|
||||||
|
<local:CheckedImageToggleButton ToolTip="{Binding EdgeAnalysis_ToolTip}"
|
||||||
|
IsChecked="{Binding bEdgeAnalysis_IsChecked}"
|
||||||
|
IsEnabled="{Binding bEdgeAnalysis_IsEnabled}"
|
||||||
|
ImageSource="/Resources/InstrumentPanel/EdgeAnalysis.png"
|
||||||
|
CheckedImageSource="/Resources/InstrumentPanel/EdgeAnalysis_White.png"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource BottomPanel_ToggleButton}">
|
||||||
|
</local:CheckedImageToggleButton>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
|||||||
@@ -6,6 +6,20 @@ Imports EgtWPFLib5
|
|||||||
Public Class MyInstrumentPanelVM
|
Public Class MyInstrumentPanelVM
|
||||||
Inherits InstrumentPanelVM
|
Inherits InstrumentPanelVM
|
||||||
|
|
||||||
|
Private m_PrevSelObjs As New List(Of Integer)
|
||||||
|
Friend ReadOnly Property PrevSelObjs As List(Of Integer)
|
||||||
|
Get
|
||||||
|
Return m_PrevSelObjs
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_PrevPage As Pages
|
||||||
|
Friend ReadOnly Property PrevPage As Pages
|
||||||
|
Get
|
||||||
|
Return m_PrevPage
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_InstrumentPanel_IsEnabled As Boolean = True
|
Private m_InstrumentPanel_IsEnabled As Boolean = True
|
||||||
Public Property InstrumentPanel_IsEnabled As Boolean
|
Public Property InstrumentPanel_IsEnabled As Boolean
|
||||||
Get
|
Get
|
||||||
@@ -16,6 +30,130 @@ Public Class MyInstrumentPanelVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_bEdgeAnalysis_IsChecked As Boolean
|
||||||
|
Public Property bEdgeAnalysis_IsChecked As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bEdgeAnalysis_IsChecked
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
' verifico che non sia in corso un altro comando
|
||||||
|
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||||
|
m_bEdgeAnalysis_IsChecked = value
|
||||||
|
If value Then
|
||||||
|
' salvo pagina precedente ed imposto pagina nulla
|
||||||
|
m_PrevPage = Map.refTopPanelVM.SelPage
|
||||||
|
Map.refTopPanelVM.SelPage = Pages.NULL
|
||||||
|
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||||
|
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||||
|
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||||
|
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(False)
|
||||||
|
Map.refSliceManagerVM.SetButtonsIsEnabled(False)
|
||||||
|
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
|
||||||
|
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
|
||||||
|
' Disabilito segnalazione modificato
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
|
' salvo selezione precedente e deseleziono altri oggetti
|
||||||
|
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
|
||||||
|
While nSelObjId <> GDB_ID.NULL
|
||||||
|
m_PrevSelObjs.Add(nSelObjId)
|
||||||
|
nSelObjId = EgtGetNextSelectedObj()
|
||||||
|
End While
|
||||||
|
' eseguo comando su tutti i pezzi
|
||||||
|
Dim sResult As String = "Chunk Number for every part:"
|
||||||
|
For Each CurrPart In Map.refTopPanelVM.PartList
|
||||||
|
EgtDeselectAll()
|
||||||
|
Dim nPrintSolidId As Integer = EgtGetFirstInGroup(CurrPart.nPrintSolidLayerId)
|
||||||
|
Dim nChunkLayerId As Integer = EgtGetFirstNameInGroup(CurrPart.nPartId, LAY_CHUNKS)
|
||||||
|
If nChunkLayerId = GDB_ID.NULL Then
|
||||||
|
nChunkLayerId = EgtCreateGroup(CurrPart.nPartId)
|
||||||
|
EgtSetName(nChunkLayerId, LAY_CHUNKS)
|
||||||
|
End If
|
||||||
|
EgtSelectObj(nPrintSolidId)
|
||||||
|
EgtSetCurrPartLayer(CurrPart.nPartId, nChunkLayerId)
|
||||||
|
' estraggo bordi superficie
|
||||||
|
Dim nCount As Integer = 0
|
||||||
|
If EgtGetType(nPrintSolidId) = GDB_TY.SRF_FRGN Then
|
||||||
|
For nChunk As Integer = 0 To EgtSurfFrChunkCount(nPrintSolidId) - 1
|
||||||
|
EgtExtractSurfFrChunkLoops(nPrintSolidId, nChunk, nChunkLayerId, nCount)
|
||||||
|
Next
|
||||||
|
ElseIf EgtGetType(nPrintSolidId) = GDB_TY.SRF_MESH Then
|
||||||
|
EgtExtractSurfTmLoops(nPrintSolidId, nChunkLayerId, nCount)
|
||||||
|
ElseIf EgtGetType(nPrintSolidId) = GDB_TY.SRF_BEZ Then
|
||||||
|
EgtExtractSurfBezierLoops(nPrintSolidId, nChunkLayerId, nCount)
|
||||||
|
End If
|
||||||
|
sResult &= Environment.NewLine & CurrPart.sName & " = " & nCount
|
||||||
|
Next
|
||||||
|
EgtDeselectAll()
|
||||||
|
' li seleziono per evidenziarli
|
||||||
|
For Each CurrPart In Map.refTopPanelVM.PartList
|
||||||
|
Dim nChunkLayerId As Integer = EgtGetFirstNameInGroup(CurrPart.nPartId, LAY_CHUNKS)
|
||||||
|
Dim nChunkId As Integer = EgtGetFirstInGroup(nChunkLayerId)
|
||||||
|
While nChunkId <> GDB_ID.NULL
|
||||||
|
EgtSelectObj(nChunkId)
|
||||||
|
nChunkId = EgtGetNext(nChunkId)
|
||||||
|
End While
|
||||||
|
Next
|
||||||
|
EgtDraw()
|
||||||
|
' Ripristino stato segnalazione modifica
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
MessageBox.Show(sResult)
|
||||||
|
Else
|
||||||
|
' Disabilito segnalazione modificato
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
|
' cancello tutti i gruppi con i chunk
|
||||||
|
For Each CurrPart In Map.refTopPanelVM.PartList
|
||||||
|
Dim nChunkLayerId As Integer = EgtGetFirstNameInGroup(CurrPart.nPartId, LAY_CHUNKS)
|
||||||
|
If nChunkLayerId <> GDB_ID.NULL Then EgtErase(nChunkLayerId)
|
||||||
|
Next
|
||||||
|
' ripristino selezioni precedenti
|
||||||
|
For Each Id In m_PrevSelObjs
|
||||||
|
EgtSelectObj(Id)
|
||||||
|
Next
|
||||||
|
' Ripristino stato segnalazione modifica
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
EgtDraw()
|
||||||
|
' ripristino pagina precedente
|
||||||
|
Map.refTopPanelVM.SelPage = m_PrevPage
|
||||||
|
' riabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||||
|
Map.refProjManagerVM.SetProjCmdIsEnabled(True)
|
||||||
|
Map.refTopPanelVM.SetTopPanelIsEnabled(True)
|
||||||
|
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True)
|
||||||
|
Map.refSliceManagerVM.SetButtonsIsEnabled(True)
|
||||||
|
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
|
||||||
|
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bEdgeAnalysis_IsEnabled As Boolean = True
|
||||||
|
Public Property bEdgeAnalysis_IsEnabled As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bEdgeAnalysis_IsEnabled
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bEdgeAnalysis_IsEnabled = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetEdgeAnalysisIsEnabled(value As Boolean)
|
||||||
|
m_bEdgeAnalysis_IsEnabled = value
|
||||||
|
NotifyPropertyChanged(NameOf(bEdgeAnalysis_IsEnabled))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "Tooltip"
|
||||||
|
|
||||||
|
Public ReadOnly Property GetDist_ToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Distance"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property EdgeAnalysis_ToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Edge Analysis"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Tooltip
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
#Region "CONSTRUCTORS"
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
<UserControl x:Class="LeftPanelV"
|
<UserControl x:Class="LeftPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
xmlns:PrintApp="clr-namespace:Icarus"
|
xmlns:PrintApp="clr-namespace:Icarus"
|
||||||
Margin="5">
|
Margin="5,0,5,0">
|
||||||
<TabControl SelectedIndex="{Binding SelPanel}"
|
<TabControl SelectedIndex="{Binding SelPanel}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0">
|
BorderThickness="0"
|
||||||
|
Margin="0"
|
||||||
|
Padding="0">
|
||||||
<TabControl.ItemContainerStyle>
|
<TabControl.ItemContainerStyle>
|
||||||
<Style TargetType="{x:Type TabItem}">
|
<Style TargetType="{x:Type TabItem}">
|
||||||
<Setter Property="Visibility" Value="Collapsed"/>
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
@@ -15,7 +17,8 @@
|
|||||||
<TabItem Header="NULL">
|
<TabItem Header="NULL">
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="IMPORT">
|
<TabItem Header="IMPORT">
|
||||||
<PrintApp:ImportPanelV DataContext="{StaticResource ImportPanelVM}"/>
|
<!--<PrintApp:ImportPanelV DataContext="{StaticResource ImportPanelVM}"/>-->
|
||||||
|
<PrintApp:ManagePartPanelV DataContext="{StaticResource ManagePartPanelVM}"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="DISPOSITION">
|
<TabItem Header="DISPOSITION">
|
||||||
<PrintApp:DispositionPanelV DataContext="{StaticResource DispositionPanelVM}"/>
|
<PrintApp:DispositionPanelV DataContext="{StaticResource DispositionPanelVM}"/>
|
||||||
@@ -33,10 +36,11 @@
|
|||||||
<PrintApp:ShellNumberPanelV DataContext="{StaticResource ShellNumberPanelVM}"/>
|
<PrintApp:ShellNumberPanelV DataContext="{StaticResource ShellNumberPanelVM}"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="AUXSOLIDS">
|
<TabItem Header="AUXSOLIDS">
|
||||||
<Button Height="100"/>
|
<PrintApp:FilledSolidPanelV DataContext="{StaticResource FilledSolidPanelVM}"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="MODIFYPART">
|
<TabItem Header="MODIFYPART">
|
||||||
<PrintApp:ModifyPartPanelV DataContext="{StaticResource ModifyPartPanelVM}"/>
|
<!--<PrintApp:ModifyPartPanelV DataContext="{StaticResource ModifyPartPanelVM}"/>-->
|
||||||
|
<PrintApp:ManagePartPanelV DataContext="{StaticResource ManagePartPanelVM}"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ Public Class LeftPanelVM
|
|||||||
Map.refRibPanelVM.Dispose()
|
Map.refRibPanelVM.Dispose()
|
||||||
Case Panels.SHELLNUMBER
|
Case Panels.SHELLNUMBER
|
||||||
Map.refShellNumberPanelVM.Dispose()
|
Map.refShellNumberPanelVM.Dispose()
|
||||||
|
Case Panels.AUXSOLIDS
|
||||||
|
Map.refFilledSolidPanelVM.Dispose()
|
||||||
End Select
|
End Select
|
||||||
m_SelPanel = Panel
|
m_SelPanel = Panel
|
||||||
Select Case Panel
|
Select Case Panel
|
||||||
@@ -54,10 +56,12 @@ Public Class LeftPanelVM
|
|||||||
Map.refRibPanelVM.Init()
|
Map.refRibPanelVM.Init()
|
||||||
Case Panels.SHELLNUMBER
|
Case Panels.SHELLNUMBER
|
||||||
Map.refShellNumberPanelVM.Init()
|
Map.refShellNumberPanelVM.Init()
|
||||||
|
Case Panels.AUXSOLIDS
|
||||||
|
Map.refFilledSolidPanelVM.Init()
|
||||||
Case Panels.MODIFYPART
|
Case Panels.MODIFYPART
|
||||||
Map.refModifyPartPanelVM.Init()
|
Map.refManagePartPanelVM.Init(ManagePartPanelVM.ManagePartType.MODIFY)
|
||||||
End Select
|
End Select
|
||||||
Map.refViewLayerManagerVM.UpdateForced()
|
If Not IsNothing(Map.refViewLayerManagerVM) Then Map.refViewLayerManagerVM.UpdateForced()
|
||||||
NotifyPropertyChanged(NameOf(SelPanel))
|
NotifyPropertyChanged(NameOf(SelPanel))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -1,50 +1,42 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="MachSaveInDbWndV"
|
<EgtWPFLib5:EgtMainWindow x:Class="MachSaveInDbWndV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
Title="Save in Database"
|
||||||
Title="Machining Param Name"
|
SizeToContent="WidthAndHeight"
|
||||||
Height="150" Width="300"
|
WindowStartupLocation="CenterOwner"
|
||||||
WindowStartupLocation="CenterOwner"
|
Style="{StaticResource Dialog_Window}">
|
||||||
Icon="/Resources/Icarus.ico"
|
<Grid Margin="2.5,2.5,2.5,0">
|
||||||
WindowStyle="None" ResizeMode="NoResize"
|
|
||||||
ShowInTaskbar="False"
|
|
||||||
IsMinimizable="False">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="10"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Column="1"
|
<TextBlock Text="Write the new Database machining name"
|
||||||
Grid.Row="1"
|
Margin="20,20,20,2.5"
|
||||||
Text="Name"
|
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||||
Margin="0,0,10,0"
|
<EgtWPFLib5:EgtTextBox2 Grid.Row="1"
|
||||||
Style="{Binding OptionTextBlock}"/>
|
Text="{Binding sName}"
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="2"
|
IsExplicitFocused="True"
|
||||||
Grid.Row="1"
|
Width="160"
|
||||||
Width="180"
|
Margin="20,10,20,2.5"
|
||||||
Text="{Binding sName}"
|
Style="{StaticResource LeftPanel_TextBox2}"/>
|
||||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
<UniformGrid Grid.Row="3"
|
||||||
<UniformGrid Grid.Column="1"
|
Rows="1"
|
||||||
Grid.ColumnSpan="2"
|
Margin="0,20,0,0">
|
||||||
Grid.Row="3"
|
<Button Command="{Binding Ok_Command}"
|
||||||
Rows="1">
|
|
||||||
<Button Content="Ok"
|
|
||||||
Command="{Binding Ok_Command}"
|
|
||||||
IsDefault="True"
|
IsDefault="True"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Margin="0,0,2.5,0"
|
||||||
<Button Content="Cancel"
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
Command="{Binding Cancel_Command}"
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding Cancel_Command}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Cancel.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
|
|||||||
@@ -4,52 +4,9 @@
|
|||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
IsEnabled="{Binding MachPanel_IsEnabled}">
|
IsEnabled="{Binding MachPanel_IsEnabled}">
|
||||||
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Grid Margin="0,0,5,0">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<!--<TextBlock Grid.Row="0" Grid.Column="0" Text="Macchina corrente" VerticalAlignment="Center" Margin="0,0,5,0"/>-->
|
|
||||||
<!--Combobox per selezionare la macchina corrente-->
|
|
||||||
<!--<ComboBox ItemsSource="{Binding Path=MachineList}"
|
|
||||||
SelectedItem="{Binding Path=SelectedMachine}"
|
|
||||||
DisplayMemberPath="Name"
|
|
||||||
SelectedValuePath="Name"
|
|
||||||
Height="22" Width="150"
|
|
||||||
Grid.Row="0" Grid.Column="1"/>-->
|
|
||||||
<!--<Rectangle HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
Fill="LightGray"/>-->
|
|
||||||
<TextBlock Text="{Binding SelectedMachine.Name}"
|
<TextBlock Text="{Binding SelectedMachine.Name}"
|
||||||
Style="{StaticResource OptionTextBlock}"/>
|
FontSize="18"
|
||||||
</Grid>
|
HorizontalAlignment="Center"
|
||||||
<!--<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
Style="{StaticResource BaseTextBlock}"/>
|
||||||
<Button Command="{Binding ToolDbCommand}" ToolTip="{Binding ToolDBToolTip}"
|
|
||||||
Style="{StaticResource ToolBar_TextButton}" Content="{Binding ToolDBMsg}"/>
|
|
||||||
<Button Command="{Binding MachDbCommand}" ToolTip="{Binding MachiningDbToolTip}"
|
|
||||||
Style="{StaticResource ToolBar_TextButton}" Content="{Binding MachiningDbMsg}"/>
|
|
||||||
--><!--<Button Command="{Binding SetUpCommand}" ToolTip="{Binding SetUpToolTip}"
|
|
||||||
Style="{StaticResource ToolBar_TextButton}" Content="{Binding SetUpMsg}"
|
|
||||||
Background="{Binding SetUp_Background}"/>--><!--
|
|
||||||
<Button ToolTip="{Binding BeamTable_ToolTip}"
|
|
||||||
Style="{StaticResource ToolBar_Button}"
|
|
||||||
Command="{Binding BeamTable_Command}"
|
|
||||||
Visibility="{Binding BeamTable_Visibility}">
|
|
||||||
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
|
|
||||||
</Button>
|
|
||||||
<Button ToolTip="{Binding WallTable_ToolTip}"
|
|
||||||
Style="{StaticResource ToolBar_Button}"
|
|
||||||
Command="{Binding WallTable_Command}"
|
|
||||||
Visibility="{Binding WallTable_Visibility}">
|
|
||||||
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
|
|
||||||
</Button>
|
|
||||||
--><!--<Button Command="{Binding MachOptionsCommand}" ToolTip="{Binding OptionsToolTip}">
|
|
||||||
<Image Source="/Resources/ProjectManager/Options.png" Height="22" />
|
|
||||||
</Button>--><!--
|
|
||||||
</StackPanel>-->
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<UserControl x:Class="MachineViewPanelV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
VerticalContentAlignment="Top">
|
||||||
|
<ComboBox SelectedIndex="{Binding ghSelMachView}"
|
||||||
|
Height="40"
|
||||||
|
Width="40"
|
||||||
|
Style="{StaticResource SelViewSlider_ComboBox}">
|
||||||
|
<ComboBoxItem>
|
||||||
|
<Image Source="\Resources\SimulationPanel\ToolMode.png"
|
||||||
|
Style="{StaticResource ComboBox.Image}"/>
|
||||||
|
</ComboBoxItem>
|
||||||
|
<ComboBoxItem>
|
||||||
|
<Image Source="\Resources\SimulationPanel\HeadMode.png"
|
||||||
|
Style="{StaticResource ComboBox.Image}"/>
|
||||||
|
</ComboBoxItem>
|
||||||
|
<ComboBoxItem>
|
||||||
|
<Image Source="\Resources\SimulationPanel\MachMode.png"
|
||||||
|
Style="{StaticResource ComboBox.Image}"/>
|
||||||
|
</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class MachineViewPanelV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class MachineViewPanelVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Property ghSelMachView As Integer
|
||||||
|
Get
|
||||||
|
Return If(Not IsNothing(Map.refSimulationPanelVM) AndAlso Not IsNothing(Map.refSimulationPanelVM.MySimul), Map.refSimulationPanelVM.MySimul.GetMachLook() - 1, Nothing)
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
If Not IsNothing(Map.refSimulationPanelVM) AndAlso Not IsNothing(Map.refSimulationPanelVM.MySimul) Then
|
||||||
|
Map.refSimulationPanelVM.MySimul.SetMachLook(value + 1)
|
||||||
|
' aggiorno lo stato della macchina e la sua visualizzazione
|
||||||
|
EgtSetMachineLook(Map.refSimulationPanelVM.MySimul.GetMachLook())
|
||||||
|
WriteMainPrivateProfileString(S_SIMUL, K_MACHVIEWMODE, value + 1)
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub RefreshSelViewSlider()
|
||||||
|
NotifyPropertyChanged(NameOf(ghSelMachView))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||||
|
Map.SetRefMachineViewPanelVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -1,34 +1,77 @@
|
|||||||
<UserControl x:Class="MachiningDbV"
|
<Grid x:Class="MachiningDbV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
xmlns:PrintApp="clr-namespace:Icarus"
|
xmlns:PrintApp="clr-namespace:Icarus"
|
||||||
Width="300">
|
Width="310"
|
||||||
<Border VerticalAlignment="Center"
|
VerticalAlignment="Center">
|
||||||
Style="{StaticResource RightPanel_Border}">
|
<Grid.RowDefinitions>
|
||||||
<Grid>
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Margin="0,0,0,2.5"
|
||||||
|
Style="{StaticResource Title_Border}">
|
||||||
|
<TextBlock Text="MACHINING DATABASE"
|
||||||
|
Style="{StaticResource Title_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Row="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="0,2.5,0,0"
|
||||||
|
Style="{StaticResource BottomGrayRow_Border}">
|
||||||
|
<Grid Margin="2.5,2.5,2.5,0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<UniformGrid Rows="1">
|
<Grid HorizontalAlignment="Center"
|
||||||
|
Margin="0,2.5,0,2.5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<Button Content="New"
|
<Button Content="New"
|
||||||
Command="{Binding New_Command}"
|
Command="{Binding New_Command}"
|
||||||
IsEnabled="{Binding IsEnabled}"
|
IsEnabled="{Binding IsEnabled}"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_Button}"/>
|
||||||
<Button Content="Save"
|
<Button Content="Save"
|
||||||
|
Grid.Column="1"
|
||||||
Command="{Binding Save_Command}"
|
Command="{Binding Save_Command}"
|
||||||
IsEnabled="{Binding IsEnabled}"
|
IsEnabled="{Binding IsEnabled}"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_Button}"/>
|
||||||
<Button Content="Delete"
|
<Button Content="Delete"
|
||||||
|
Grid.Column="2"
|
||||||
Command="{Binding Delete_Command}"
|
Command="{Binding Delete_Command}"
|
||||||
IsEnabled="{Binding IsEnabled}"
|
IsEnabled="{Binding IsEnabled}"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Margin="2.5,0,2.5,0"
|
||||||
</UniformGrid>
|
Style="{StaticResource RightPanel_Button}"/>
|
||||||
<Grid Grid.Row="1">
|
<Button Grid.Column="3"
|
||||||
|
Command="{Binding Import_Command}"
|
||||||
|
ToolTip="{Binding Import_ToolTip}"
|
||||||
|
IsEnabled="{Binding ImpExp_IsEnabled}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/MachiningDB/MachiningImport.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="4"
|
||||||
|
Command="{Binding Export_Command}"
|
||||||
|
ToolTip="{Binding Export_ToolTip}"
|
||||||
|
IsEnabled="{Binding ImpExp_IsEnabled}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/MachiningDB/MachiningExport.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="1"
|
||||||
|
Margin="0,2.5,0,2.5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
@@ -38,26 +81,40 @@
|
|||||||
SelectedItem="{Binding SelMachining}"
|
SelectedItem="{Binding SelMachining}"
|
||||||
DisplayMemberPath="ghName"
|
DisplayMemberPath="ghName"
|
||||||
Visibility="{Binding Combo_Visibility}"
|
Visibility="{Binding Combo_Visibility}"
|
||||||
Style="{StaticResource FeatureComboBox}"/>
|
HorizontalAlignment="Stretch"
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding SelectedItem.sName, ElementName=MachiningCombo, UpdateSourceTrigger=Explicit}"
|
Margin="2.5,0,2.5,0"
|
||||||
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||||
Visibility="{Binding Name_Visibility}"
|
<EgtWPFLib5:EgtTextBox2 Text="{Binding SelectedItem.sName, ElementName=MachiningCombo, UpdateSourceTrigger=Explicit}"
|
||||||
Style="{StaticResource OptionTextBox}"/>
|
ExplicitUpdateSource="EnterKeyPressOrLostFocus"
|
||||||
|
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
||||||
|
Visibility="{Binding Name_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource OptionTextBox2}"/>
|
||||||
<Button Grid.Column="1"
|
<Button Grid.Column="1"
|
||||||
Command="{Binding EditName_Command}"
|
Command="{Binding EditName_Command}"
|
||||||
|
ToolTip="{Binding EditName_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Style="{StaticResource ToolBar_Button}">
|
||||||
<Image Source="/Resources/TopPanel/Edit.png"/>
|
<Image Source="/Resources/MachiningDB/Edit.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
<ScrollViewer Grid.Row="3"
|
<ScrollViewer Grid.Row="2"
|
||||||
|
IsEnabled="{Binding IsEnabled}"
|
||||||
VerticalScrollBarVisibility="Auto"
|
VerticalScrollBarVisibility="Auto"
|
||||||
HorizontalScrollBarVisibility="Disabled">
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
<ItemsControl Grid.Row="1"
|
Margin="1,0,0,2.5"
|
||||||
ItemsSource="{Binding SelectedItem.CathegoryList, ElementName=MachiningCombo}"
|
Padding="0"
|
||||||
IsEnabled="{Binding IsEnabled}">
|
BorderThickness="0"
|
||||||
|
Style="{StaticResource RightPanel_ScrollViewer}">
|
||||||
|
<ItemsControl ItemsSource="{Binding SelectedItem.CathegoryList, ElementName=MachiningCombo}"
|
||||||
|
BorderThickness="0"
|
||||||
|
Margin="0"
|
||||||
|
Padding="0">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel Orientation="Vertical"/>
|
<StackPanel Orientation="Vertical"
|
||||||
|
Margin="0"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
@@ -65,102 +122,142 @@
|
|||||||
<Expander Header="{Binding sName}"
|
<Expander Header="{Binding sName}"
|
||||||
IsExpanded="{Binding Cathegory_IsExpanded}"
|
IsExpanded="{Binding Cathegory_IsExpanded}"
|
||||||
VerticalContentAlignment="Top">
|
VerticalContentAlignment="Top">
|
||||||
<ItemsControl ItemsSource="{Binding MachiningParamList}">
|
<ItemsControl ItemsSource="{Binding MachiningParamList}"
|
||||||
|
BorderThickness="0"
|
||||||
|
Margin="0"
|
||||||
|
Padding="0">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<UniformGrid Columns="1"
|
<StackPanel Orientation="Vertical"
|
||||||
HorizontalAlignment="Stretch"/>
|
Margin="0"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.Resources>
|
<ItemsControl.Resources>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
|
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
|
||||||
<Grid>
|
<Grid Margin="0,1,2.5,1"
|
||||||
|
IsEnabled="{Binding bIsActive}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBox Grid.Column="1"
|
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||||
Text="{Binding sValue}"/>
|
Margin="0,0,2.5,0"
|
||||||
<!--<Button Grid.Column="2"
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
Content="R"
|
<TextBlock Text=" (BETA)"
|
||||||
Command="{Binding ResetParam_Command}"
|
Margin="0,0,2.5,0"
|
||||||
CommandParameter="dCurrStrandH"
|
Foreground="Red"
|
||||||
IsEnabled="{Binding bCurrStrandH_IsModified}"
|
Visibility="{Binding IsBeta_Visibility}"
|
||||||
VerticalContentAlignment="Center"
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
HorizontalContentAlignment="Center"
|
</StackPanel>
|
||||||
Margin="5,0,0,0"
|
<EgtWPFLib5:EgtTextBox2 Grid.Column="1"
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>-->
|
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||||
|
Margin="2.5,0,0,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBox2}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
|
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
|
||||||
<Grid>
|
<Grid Margin="0,1,2.5,1"
|
||||||
|
IsEnabled="{Binding bIsActive}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<!--<ColumnDefinition Width="Auto"/>-->
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
<TextBlock Text=" (BETA)"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Foreground="Red"
|
||||||
|
Visibility="{Binding IsBeta_Visibility}"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
</StackPanel>
|
||||||
<ComboBox Grid.Column="1"
|
<ComboBox Grid.Column="1"
|
||||||
ItemsSource="{Binding ValueList}"
|
ItemsSource="{Binding ValueList}"
|
||||||
SelectedItem="{Binding SelValue}"
|
SelectedItem="{Binding SelValue}"
|
||||||
HorizontalAlignment="Stretch"/>
|
HorizontalAlignment="Stretch"
|
||||||
<!--<Button Grid.Column="1"
|
Margin="2.5,0,0,0"
|
||||||
Content="R"
|
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||||
Command="{Binding ResetParam_Command}"
|
|
||||||
CommandParameter="dCurrStrandH"
|
|
||||||
IsEnabled="{Binding bCurrStrandH_IsModified}"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
HorizontalContentAlignment="Center"
|
|
||||||
Margin="5,0,0,0"
|
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>-->
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
|
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
|
||||||
<Grid>
|
<Grid Height="22"
|
||||||
|
Margin="0,1,2.5,1"
|
||||||
|
IsEnabled="{Binding bIsActive}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<!--<ColumnDefinition Width="Auto"/>-->
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
<TextBlock Text=" (BETA)"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Foreground="Red"
|
||||||
|
Visibility="{Binding IsBeta_Visibility}"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
</StackPanel>
|
||||||
<CheckBox Grid.Column="1"
|
<CheckBox Grid.Column="1"
|
||||||
IsChecked="{Binding bValue}"
|
IsChecked="{Binding bValue}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"
|
||||||
<!--<Button Grid.Column="1"
|
Margin="2.5,0,0,0"/>
|
||||||
Content="R"
|
|
||||||
Command="{Binding ResetParam_Command}"
|
|
||||||
CommandParameter="dCurrStrandH"
|
|
||||||
IsEnabled="{Binding bCurrStrandH_IsModified}"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
HorizontalContentAlignment="Center"
|
|
||||||
Margin="5,0,0,0"
|
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>-->
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:MaterialMachiningParam}">
|
<DataTemplate DataType="{x:Type PrintApp:MaterialMachiningParam}">
|
||||||
<Grid>
|
<Grid Height="22"
|
||||||
|
Margin="0,1,2.5,1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<!--<ColumnDefinition Width="Auto"/>-->
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
<CheckBox Grid.Column="1"
|
<CheckBox Grid.Column="1"
|
||||||
IsChecked="{Binding bValue}"
|
IsChecked="{Binding bValue}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"
|
||||||
<!--<Button Grid.Column="1"
|
Margin="2.5,0,0,0"/>
|
||||||
Content="R"
|
</Grid>
|
||||||
Command="{Binding ResetParam_Command}"
|
</DataTemplate>
|
||||||
CommandParameter="dCurrStrandH"
|
<DataTemplate DataType="{x:Type PrintApp:OrderedMachiningParam}">
|
||||||
IsEnabled="{Binding bCurrStrandH_IsModified}"
|
<Grid Margin="0,1,2.5,1">
|
||||||
VerticalContentAlignment="Center"
|
<Grid.ColumnDefinitions>
|
||||||
HorizontalContentAlignment="Center"
|
<ColumnDefinition Width="1*"/>
|
||||||
Margin="5,0,0,0"
|
<ColumnDefinition Width="1*"/>
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>-->
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
|
<Grid Grid.Column="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ListBox ItemsSource="{Binding ValueList}"
|
||||||
|
SelectedItem="{Binding SelValue}"
|
||||||
|
Margin="2.5,0,2.5,0"/>
|
||||||
|
<StackPanel Grid.Column="1"
|
||||||
|
Orientation="Vertical"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="2.5,0,0,0">
|
||||||
|
<Button Content="˄"
|
||||||
|
Command="{Binding MoveUpOrder_Command}"
|
||||||
|
Margin="0,0,0,2.5"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
|
<Button Content="˅"
|
||||||
|
Command="{Binding MoveDownOrder_Command}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
|
<Button Content="<>"
|
||||||
|
Command="{Binding ResetOrder_Command}"
|
||||||
|
Margin="0,2.5,0,0"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.Resources>
|
</ItemsControl.Resources>
|
||||||
@@ -170,12 +267,14 @@
|
|||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
<UniformGrid Grid.Row="4" Rows="1">
|
<Button Grid.Row="3"
|
||||||
<Button Content="Ok"
|
Command="{Binding Ok_Command}"
|
||||||
Command="{Binding Ok_Command}"
|
IsEnabled="{Binding IsEnabled}"
|
||||||
IsEnabled="{Binding IsEnabled}"
|
Margin="0,2.5,0,0"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
</UniformGrid>
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</Grid>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Public Class MachiningDbVM
|
|||||||
' verifico se modificato
|
' verifico se modificato
|
||||||
If m_SelMachining.bIsModified Then
|
If m_SelMachining.bIsModified Then
|
||||||
' chiedo se salvare
|
' chiedo se salvare
|
||||||
Select Case MessageBox.Show("Salvare le modifiche apportate alla lavorazione selezionata?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
Select Case MessageBox.Show("Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
|
||||||
Case MessageBoxResult.Yes
|
Case MessageBoxResult.Yes
|
||||||
m_SelMachining.Save()
|
m_SelMachining.Save()
|
||||||
Case MessageBoxResult.No
|
Case MessageBoxResult.No
|
||||||
@@ -50,6 +50,7 @@ Public Class MachiningDbVM
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(ImpExp_IsEnabled))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -105,12 +106,42 @@ Public Class MachiningDbVM
|
|||||||
NotifyPropertyChanged(NameOf(UserShouldEditValueNow))
|
NotifyPropertyChanged(NameOf(UserShouldEditValueNow))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public ReadOnly Property ImpExp_IsEnabled As Boolean
|
||||||
|
Get
|
||||||
|
Return m_IsEnabled AndAlso (IsNothing(m_SelMachining) OrElse Not m_SelMachining.bIsModified)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Tooltip"
|
||||||
|
|
||||||
|
Public ReadOnly Property Import_ToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Import"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Export_ToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Export"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property EditName_ToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Edit Name"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Tooltip
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdOk As ICommand
|
Private m_cmdOk As ICommand
|
||||||
Private m_cmdNew As ICommand
|
Private m_cmdNew As ICommand
|
||||||
Private m_cmdSave As ICommand
|
Private m_cmdSave As ICommand
|
||||||
Private m_cmdDelete As ICommand
|
Private m_cmdDelete As ICommand
|
||||||
Private m_cmdEditName As ICommand
|
Private m_cmdEditName As ICommand
|
||||||
|
Private m_cmdImport As ICommand
|
||||||
|
Private m_cmdExport As ICommand
|
||||||
|
|
||||||
#End Region ' FIELDS & PROPERTIES
|
#End Region ' FIELDS & PROPERTIES
|
||||||
|
|
||||||
@@ -138,6 +169,7 @@ Public Class MachiningDbVM
|
|||||||
GetMainPrivateProfileString(S_PRINTING3D, K_CURRMACHINING, "", sCurrMachining)
|
GetMainPrivateProfileString(S_PRINTING3D, K_CURRMACHINING, "", sCurrMachining)
|
||||||
m_SelMachining = MachiningList.FirstOrDefault(Function(x) x.sGUID = sCurrMachining)
|
m_SelMachining = MachiningList.FirstOrDefault(Function(x) x.sGUID = sCurrMachining)
|
||||||
NotifyPropertyChanged(NameOf(SelMachining))
|
NotifyPropertyChanged(NameOf(SelMachining))
|
||||||
|
NotifyPropertyChanged(NameOf(ImpExp_IsEnabled))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub SetNameVisibility(bValue As Boolean)
|
Friend Sub SetNameVisibility(bValue As Boolean)
|
||||||
@@ -213,7 +245,7 @@ Public Class MachiningDbVM
|
|||||||
' aggiorno combo top
|
' aggiorno combo top
|
||||||
Dim CurrSelTopMachining As MachiningIndex = Map.refTopPanelVM.SelMachining
|
Dim CurrSelTopMachining As MachiningIndex = Map.refTopPanelVM.SelMachining
|
||||||
Map.refTopPanelVM.InitMachiningsList()
|
Map.refTopPanelVM.InitMachiningsList()
|
||||||
Map.refTopPanelVM.SetSelMachining( CurrSelTopMachining)
|
Map.refTopPanelVM.SetSelMachining(CurrSelTopMachining)
|
||||||
End If
|
End If
|
||||||
' ripristino modalita' standard
|
' ripristino modalita' standard
|
||||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||||
@@ -239,6 +271,7 @@ Public Class MachiningDbVM
|
|||||||
m_SelMachining = NewMachining
|
m_SelMachining = NewMachining
|
||||||
NotifyPropertyChanged(NameOf(SelMachining))
|
NotifyPropertyChanged(NameOf(SelMachining))
|
||||||
SetNameVisibility(True)
|
SetNameVisibility(True)
|
||||||
|
SetIsModified(True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' New
|
#End Region ' New
|
||||||
@@ -255,8 +288,9 @@ Public Class MachiningDbVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub Save()
|
Public Sub Save()
|
||||||
If IsNothing( m_SelMachining) Then Return
|
If IsNothing(m_SelMachining) Then Return
|
||||||
m_SelMachining.Save()
|
m_SelMachining.Save()
|
||||||
|
NotifyPropertyChanged(NameOf(ImpExp_IsEnabled))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Save
|
#End Region ' Save
|
||||||
@@ -275,10 +309,13 @@ Public Class MachiningDbVM
|
|||||||
Public Sub Delete()
|
Public Sub Delete()
|
||||||
If IsNothing(m_SelMachining) Then Return
|
If IsNothing(m_SelMachining) Then Return
|
||||||
' chiedo conferma
|
' chiedo conferma
|
||||||
Select Case MessageBox.Show("Sei sicuro di voler cancellare la lavorazione selezionata?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
Select Case MessageBox.Show("Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
||||||
Case MessageBoxResult.Yes
|
Case MessageBoxResult.Yes
|
||||||
m_MachiningList.Remove(m_SelMachining)
|
m_MachiningList.Remove(m_SelMachining)
|
||||||
SetIsModified(True)
|
SetIsModified(True)
|
||||||
|
If m_MachiningList.Count > 0 Then
|
||||||
|
SelMachining = m_MachiningList(0)
|
||||||
|
End If
|
||||||
Case MessageBoxResult.No
|
Case MessageBoxResult.No
|
||||||
Return
|
Return
|
||||||
End Select
|
End Select
|
||||||
@@ -305,6 +342,47 @@ Public Class MachiningDbVM
|
|||||||
|
|
||||||
#End Region ' EditName
|
#End Region ' EditName
|
||||||
|
|
||||||
|
#Region "Import"
|
||||||
|
|
||||||
|
Public ReadOnly Property Import_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdImport Is Nothing Then
|
||||||
|
m_cmdImport = New Command(AddressOf Import)
|
||||||
|
End If
|
||||||
|
Return m_cmdImport
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Import()
|
||||||
|
' chiedo il nome del file .data da aprire
|
||||||
|
Dim OpenFileDlg As New System.Windows.Forms.OpenFileDialog() With {.Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||||
|
.Filter = "File data (*" & ImportExportMachiningPanelVM.MachiningDataExtension & ")|*" & ImportExportMachiningPanelVM.MachiningDataExtension,
|
||||||
|
.FileName = String.Empty}
|
||||||
|
If OpenFileDlg.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then Return
|
||||||
|
Dim ImportWindow As New ImportExportMachiningPanelV(Application.Current.MainWindow, New ImportExportMachiningPanelVM(ImportExportMachiningPanelVM.WindowTypeEnum.MACHINING, ImportExportMachiningPanelVM.WindowModeEnum.IMPORT, OpenFileDlg.FileName))
|
||||||
|
ImportWindow.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Import
|
||||||
|
|
||||||
|
#Region "Export"
|
||||||
|
|
||||||
|
Public ReadOnly Property Export_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdExport Is Nothing Then
|
||||||
|
m_cmdExport = New Command(AddressOf Export)
|
||||||
|
End If
|
||||||
|
Return m_cmdExport
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Export()
|
||||||
|
Dim ExportWindow As New ImportExportMachiningPanelV(Application.Current.MainWindow, New ImportExportMachiningPanelVM(ImportExportMachiningPanelVM.WindowTypeEnum.MACHINING, ImportExportMachiningPanelVM.WindowModeEnum.EXPORT))
|
||||||
|
ExportWindow.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Export
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -75,13 +75,6 @@ Public Class MainWindowM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_bAutoNestOption As Boolean = False
|
|
||||||
Friend ReadOnly Property AutoNestOption As Boolean
|
|
||||||
Get
|
|
||||||
Return m_bAutoNestOption
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Friend ReadOnly Property sVersion As String
|
Friend ReadOnly Property sVersion As String
|
||||||
Get
|
Get
|
||||||
Return My.Application.Info.Version.Major.ToString() & "." &
|
Return My.Application.Info.Version.Major.ToString() & "." &
|
||||||
@@ -189,14 +182,17 @@ Public Class MainWindowM
|
|||||||
Dim sKey As String = String.Empty
|
Dim sKey As String = String.Empty
|
||||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||||
EgtSetKey(sKey)
|
EgtSetKey(sKey)
|
||||||
Dim sNestKey As String = ""
|
' Impostazioni per chiave di rete
|
||||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
Dim bNetKey As Boolean = ( GetMainPrivateProfileInt( S_GENERAL, K_NETKEY, 0) = 1)
|
||||||
'EgtSetNestKey(sNestKey)
|
EgtSetNetHwKey( bNetKey)
|
||||||
' Verifico abilitazione nesting automatico
|
Dim sLockId As String = ""
|
||||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
|
EgtUILib.GetPrivateProfileString( S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||||
|
If Not String.IsNullOrEmpty( sLockId) Then
|
||||||
|
EgtSetLockId( sLockId)
|
||||||
|
End If
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2410, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2508, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(3279, 2410, 1, m_nKeyOptions)
|
EgtGetKeyOptions(5583, 2508, 1, m_nKeyOptions)
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||||
|
|||||||
@@ -1,32 +1,21 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="MainWindowV"
|
<EgtWPFLib5:EgtMainWindow x:Class="MainWindowV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
xmlns:PrintApp="clr-namespace:Icarus"
|
xmlns:PrintApp="clr-namespace:Icarus"
|
||||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
MinHeight="600" MinWidth="800"
|
||||||
Title="{Binding sTitle}" Icon="/Resources/Icarus.ico"
|
AllowDrop="True"
|
||||||
MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize"
|
Drop="MainWindowV_Drop"
|
||||||
AllowDrop="True" Drop="MainWindowV_Drop"
|
ShowInTaskbar="True"
|
||||||
ShowInTaskbar="True"
|
Topmost="False"
|
||||||
Topmost="False"
|
Style="{StaticResource NoStyle_Window}">
|
||||||
CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
|
||||||
<!--<EgtWPFLib5:EgtCustomWindow.TitlePanel>
|
|
||||||
|
|
||||||
<PrintApp:ProjManagerV DataContext="{StaticResource ProjManagerVM}"/>
|
|
||||||
|
|
||||||
</EgtWPFLib5:EgtCustomWindow.TitlePanel>-->
|
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<PrintApp:SceneHostV/>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="60"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<PrintApp:SceneHostV Grid.Row="1"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<!--Pannello principale --><!--
|
|
||||||
<DockPanel>
|
|
||||||
|
|
||||||
--><!--StatusBar --><!--
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
<PrintApp:StatusBarV DataContext="{StaticResource StatusBarVM}"
|
|
||||||
DockPanel.Dock="Bottom"/>
|
|
||||||
<PrintApp:ProjectV DataContext="{StaticResource ProjectVM}"/>
|
|
||||||
|
|
||||||
</DockPanel>-->
|
|
||||||
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ Imports System.Windows.Interop
|
|||||||
Class MainWindowV
|
Class MainWindowV
|
||||||
|
|
||||||
Private m_MainWindowVM As MainWindowVM
|
Private m_MainWindowVM As MainWindowVM
|
||||||
Private m_SceneHostWnd As SecondaryWindowV
|
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
@@ -19,6 +18,9 @@ Class MainWindowV
|
|||||||
AddHandler Me.ContentRendered, AddressOf MainWindowV_ContentRendered
|
AddHandler Me.ContentRendered, AddressOf MainWindowV_ContentRendered
|
||||||
AddHandler Me.Closing, AddressOf MainWindowV_Closing
|
AddHandler Me.Closing, AddressOf MainWindowV_Closing
|
||||||
AddHandler Me.KeyDown, AddressOf MainWindowV_KeyDown
|
AddHandler Me.KeyDown, AddressOf MainWindowV_KeyDown
|
||||||
|
AddHandler Me.StateChanged, AddressOf MainWindowV_StateChanged
|
||||||
|
'AddHandler Me.LocationChanged, AddressOf MainWindowV_LocationChanged
|
||||||
|
'AddHandler Me.SizeChanged, AddressOf MainWindowV_SizeChanged
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
@@ -59,7 +61,27 @@ Class MainWindowV
|
|||||||
Me.Activate()
|
Me.Activate()
|
||||||
' Recupero l'array di stringhe con i nomi del file
|
' Recupero l'array di stringhe con i nomi del file
|
||||||
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_LocationChanged(sender As Object, e As EventArgs)
|
||||||
|
If Not IsNothing(Map.refSecondaryWindowV) Then
|
||||||
|
Map.refSecondaryWindowV.Top = Me.Top
|
||||||
|
Map.refSecondaryWindowV.Left = Me.Left
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_SizeChanged(sender As Object, e As SizeChangedEventArgs)
|
||||||
|
If Not IsNothing(Map.refSecondaryWindowV) Then
|
||||||
|
If e.WidthChanged Then Map.refSecondaryWindowV.Width = e.NewSize.Width
|
||||||
|
If e.HeightChanged Then Map.refSecondaryWindowV.Height = e.NewSize.Height
|
||||||
|
Map.refSecondaryWindowV.InvalidateVisual()
|
||||||
|
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 If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,6 @@ Imports System.Windows.Threading
|
|||||||
Public Class MainWindowVM
|
Public Class MainWindowVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
Private m_SupervisorCommThread As Thread
|
|
||||||
Private m_Supervisor_Timer As New DispatcherTimer
|
|
||||||
|
|
||||||
' Riferimento al Model della MainWindow
|
' Riferimento al Model della MainWindow
|
||||||
Private m_MainWindowM As MainWindowM
|
Private m_MainWindowM As MainWindowM
|
||||||
Friend ReadOnly Property MainWindowM As MainWindowM
|
Friend ReadOnly Property MainWindowM As MainWindowM
|
||||||
@@ -18,6 +15,9 @@ Public Class MainWindowVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
' Funzioni di callback per output in interfaccia da LUA
|
||||||
|
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
|
||||||
|
|
||||||
' Variabile che indica che il programma è stato avviato correttamente (sia la mappa che l'ambiente Egt)
|
' Variabile che indica che il programma è stato avviato correttamente (sia la mappa che l'ambiente Egt)
|
||||||
Private m_bInitStatus As Boolean
|
Private m_bInitStatus As Boolean
|
||||||
Friend ReadOnly Property bInitStatus As Boolean
|
Friend ReadOnly Property bInitStatus As Boolean
|
||||||
@@ -27,25 +27,34 @@ Public Class MainWindowVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
' Titolo
|
' Titolo
|
||||||
Private m_sTitle As String
|
Public ReadOnly Property sTitle As String
|
||||||
Public Property sTitle As String
|
|
||||||
Get
|
Get
|
||||||
Return m_sTitle
|
Return "Icarus"
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
|
||||||
m_sTitle = value
|
|
||||||
NotifyPropertyChanged(NameOf(sTitle))
|
|
||||||
End Set
|
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
' proprietà che seleziona la giusta pagina del TabControl
|
Public ReadOnly Property sProjectName As String
|
||||||
Public Property nSelTabPage As Integer
|
|
||||||
Get
|
Get
|
||||||
' Return If(IsNothing(Map.refMainMenuVM.SelPage) OrElse Map.refMainMenuVM.SelPage = -1 OrElse Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.MACHINING, 0, 1)
|
Dim sFilePath As String = ""
|
||||||
Return -1
|
EgtGetCurrFilePath(sFilePath)
|
||||||
|
If String.IsNullOrEmpty(sFilePath) Then
|
||||||
|
sFilePath = EgtMsg(MSG_TOPCOMMANDBAR + 1) & Map.refMainWindowVM.MainWindowM.nInstance.ToString()
|
||||||
|
Return sFilePath
|
||||||
|
Else
|
||||||
|
Return Path.GetFileNameWithoutExtension(sFilePath) & If(EgtGetModified(), "*", "")
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sProjectPath As String
|
||||||
|
Get
|
||||||
|
Dim sFilePath As String = ""
|
||||||
|
EgtGetCurrFilePath(sFilePath)
|
||||||
|
If String.IsNullOrEmpty(sFilePath) Then
|
||||||
|
sFilePath = EgtMsg(MSG_TOPCOMMANDBAR + 1) & Map.refMainWindowVM.MainWindowM.nInstance.ToString()
|
||||||
|
End If
|
||||||
|
Return sFilePath
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
|
||||||
End Set
|
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_MachinePanelVM As MachinePanelVM
|
Private m_MachinePanelVM As MachinePanelVM
|
||||||
@@ -55,9 +64,6 @@ Public Class MainWindowVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
'Friend m_SupervisorStop As Boolean = False
|
|
||||||
'Private BlockedWnd As BlockedWndV
|
|
||||||
|
|
||||||
' definizione comandi
|
' definizione comandi
|
||||||
Private m_cmdAboutBox As ICommand
|
Private m_cmdAboutBox As ICommand
|
||||||
Private m_cmdCloseApplication As ICommand
|
Private m_cmdCloseApplication As ICommand
|
||||||
@@ -71,117 +77,18 @@ Public Class MainWindowVM
|
|||||||
m_MainWindowM = New MainWindowM
|
m_MainWindowM = New MainWindowM
|
||||||
' inizializzo machine panel
|
' inizializzo machine panel
|
||||||
m_MachinePanelVM = New MachinePanelVM
|
m_MachinePanelVM = New MachinePanelVM
|
||||||
' inizializzo contatore per blocco da supervisore
|
' Installo funzione gestione eventi per lua
|
||||||
m_Supervisor_Timer.Interval = TimeSpan.FromMilliseconds(500)
|
EgtSetProcessEvents(m_ProcEventsCallback)
|
||||||
' AddHandler m_Supervisor_Timer.Tick, AddressOf SupervisorTimer_Tick
|
|
||||||
m_Supervisor_Timer.Start()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
'#Region "METHODS"
|
'#Region "METHODS"
|
||||||
|
|
||||||
Friend Sub SetTitle(sTitle As String)
|
|
||||||
m_sTitle = sTitle
|
|
||||||
NotifyPropertyChanged(NameOf(sTitle))
|
|
||||||
' aggiorno titolo nella secondaryPage che e' quello che si vede nella barra in alto
|
|
||||||
Map.refSecondaryWindowVM.SetTitle(sTitle)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
'Public Sub UpdateTitle()
|
|
||||||
' m_Title = ""
|
|
||||||
' Select Case Map.refMainMenuVM.SelPage
|
|
||||||
' Case Pages.VIEW
|
|
||||||
' If Not IsNothing(Map.refProjManagerVM.CurrProj) Then
|
|
||||||
' If Map.refProjManagerVM.CurrProj.bIsNew Then m_Title = "New - "
|
|
||||||
' m_Title &= Map.refProjManagerVM.CurrProj.nProjId.ToString("0000") & " - " & Map.refProjManagerVM.CurrProj.sBTLFileName
|
|
||||||
' End If
|
|
||||||
' Case Pages.MACHINING
|
|
||||||
' If Not IsNothing(Map.refProdManagerVM.CurrProd) Then
|
|
||||||
' If Map.refProdManagerVM.CurrProd.bIsNew Then m_Title = "New - "
|
|
||||||
' m_Title &= Map.refProdManagerVM.CurrProd.nProdId.ToString("0000") & " - " & Map.refProdManagerVM.CurrProd.sBTLFileName
|
|
||||||
' End If
|
|
||||||
' Case Pages.CONFIG
|
|
||||||
' m_Title = "Configuration Page"
|
|
||||||
' End Select
|
|
||||||
' m_Title &= " - EgtBEAMWALL"
|
|
||||||
' NotifyPropertyChanged(NameOf(Title))
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Friend Sub ContentRendered()
|
Friend Sub ContentRendered()
|
||||||
'DbControllers.Init()
|
|
||||||
'' chiamata a caso su Db per inizializzarlo
|
|
||||||
'DbControllers.m_ProjController.FindByProjDbId(0)
|
|
||||||
'' Verifico che l'inizializzazione di tutte le parti del programma sia andata a buon fine
|
|
||||||
'If Map.EndInit() Then
|
|
||||||
' m_bInitStatus = True
|
|
||||||
' ' altrimenti chiudo il programma
|
|
||||||
'Else
|
|
||||||
' m_bInitStatus = False
|
|
||||||
'End If
|
|
||||||
'' Aggiorno visualizzazione unità di misura
|
|
||||||
''Map.refStatusBarVM.SetMeasureUnit(If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH))
|
|
||||||
'' imposto MainWindow per finestra di Loading
|
|
||||||
'LoadingWndHelper.SetMainWindow(Application.Current.MainWindow)
|
|
||||||
'' leggo riga di comando
|
|
||||||
'Dim nCommandType As Integer = 0
|
|
||||||
'Dim nPage As Pages = Pages.VIEW
|
|
||||||
'Dim nProdId As Integer = 0
|
|
||||||
'If ProcessCommandLine(nCommandType, nPage, nProdId) Then
|
|
||||||
' Select Case nCommandType
|
|
||||||
' Case 1
|
|
||||||
' Map.refProdManagerVM.SetCurrProd(nProdId)
|
|
||||||
' Case 2
|
|
||||||
' ' pagina gia' impostata nella variabile
|
|
||||||
' End Select
|
|
||||||
'Else
|
|
||||||
' ' setto il primo file dalla lista degli MRU come progetto corrente da aprire
|
|
||||||
' Dim sLastProjectPath As String = String.Empty
|
|
||||||
' GetMainPrivateProfileString(S_MRUPROJFILES, K_FILE & "1", String.Empty, sLastProjectPath)
|
|
||||||
' If Not String.IsNullOrWhiteSpace(sLastProjectPath) AndAlso File.Exists(sLastProjectPath) Then
|
|
||||||
' ' ricavo l'Id e il progetto associato per l'apertura di quest'ultimo
|
|
||||||
' Dim PjId As Integer = 0
|
|
||||||
' Dim sPjId As String = Path.GetFileNameWithoutExtension(sLastProjectPath)
|
|
||||||
' Integer.TryParse(sPjId, PjId)
|
|
||||||
' Map.refProjManagerVM.SetCurrProj(PjId)
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
'' seleziono pagina da aprire
|
|
||||||
'Map.refMainMenuVM.SelPage = nPage
|
|
||||||
|
|
||||||
'' inizializzo thread di aggiornamento e comunicazione con DB
|
|
||||||
'' creo thread gestione macchina
|
|
||||||
'm_SupervisorCommThread = New Thread(Sub()
|
|
||||||
' SupervisorCommThread.SupervisorCommThreadFunction()
|
|
||||||
' End Sub)
|
|
||||||
'm_SupervisorCommThread.SetApartmentState(ApartmentState.STA)
|
|
||||||
'' avvio thread di gestione della macchina che avvia la connessione
|
|
||||||
'm_SupervisorCommThread.Start()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Friend Function ProcessCommandLine(ByRef nCommandType As Integer, ByRef nPage As Pages, ByRef nProdId As Integer) As Boolean
|
|
||||||
' ' Se non ci sono veri parametri su linea di comando, esco (il primo è sempre il nome del programma)
|
|
||||||
' If Environment.GetCommandLineArgs.Count() <= 1 Then Return False
|
|
||||||
' ' Recupero primo parametro che dovrebbe essere il tipo di modalita' riga di comando
|
|
||||||
' Dim sFile As String = Environment.GetCommandLineArgs(1)
|
|
||||||
' If String.IsNullOrWhiteSpace(sFile) OrElse Not Integer.TryParse(sFile, nCommandType) OrElse nCommandType <= 0 Then Return False
|
|
||||||
' Select Case nCommandType
|
|
||||||
' Case 1 ' apri progetto in ottimizzatore
|
|
||||||
' ' recupero secondo parametro
|
|
||||||
' Dim sProdId As String = Environment.GetCommandLineArgs(2)
|
|
||||||
' If Not Integer.TryParse(sProdId, nProdId) OrElse nProdId <= 0 Then Return False
|
|
||||||
' nPage = Pages.MACHINING
|
|
||||||
' Return True
|
|
||||||
' Case 2 ' apri pagina specifica senza progetto specifico
|
|
||||||
' ' recupero secondo parametro
|
|
||||||
' Dim sPage As String = Environment.GetCommandLineArgs(2)
|
|
||||||
' If Not Integer.TryParse(sPage, nPage) OrElse (nPage <> Pages.VIEW AndAlso nPage <> Pages.MACHINING) Then Return False
|
|
||||||
' Return True
|
|
||||||
' End Select
|
|
||||||
' Return False
|
|
||||||
' End Function
|
|
||||||
|
|
||||||
Friend Sub KeyDown(PressedKey As Key)
|
Friend Sub KeyDown(PressedKey As Key)
|
||||||
' Con ESC esco dall'azione corrente
|
' Con ESC esco dall'azione corrente
|
||||||
If PressedKey = Key.Escape Then
|
If PressedKey = Key.Escape Then
|
||||||
@@ -240,40 +147,25 @@ Public Class MainWindowVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Friend m_ManagingSupervisorStop As Boolean = False
|
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
|
||||||
|
If Map.refSliceManagerVM.bCalculating OrElse Map.refSliceManagerVM.bCalcSolid Then
|
||||||
|
Map.refSliceManagerVM.ProcessEvents(nProg, nPause)
|
||||||
|
End If
|
||||||
|
If Not IsNothing(Map.refImportLoadingWndVM) Then
|
||||||
|
Map.refImportLoadingWndVM.ProcessEvents(nProg, nPause)
|
||||||
|
End If
|
||||||
|
Map.refMyStatusBarVM.ProcessEvents(nProg, nPause)
|
||||||
|
Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
' Private Sub SupervisorTimer_Tick()
|
|
||||||
' If SupervisorCommThread.bViewerOptimizerBlocked And Not m_ManagingSupervisorStop Then
|
|
||||||
' m_ManagingSupervisorStop = True
|
|
||||||
' BlockedWnd = New BlockedWndV(Application.Current.MainWindow, New BlockedWndVM)
|
|
||||||
' BlockedWnd.ShowDialog()
|
|
||||||
' ElseIf Not SupervisorCommThread.bViewerOptimizerBlocked And m_ManagingSupervisorStop Then
|
|
||||||
' m_ManagingSupervisorStop = False
|
|
||||||
' BlockedWnd.Close()
|
|
||||||
' End If
|
|
||||||
' End Sub
|
|
||||||
|
|
||||||
'#End Region ' METHODS
|
|
||||||
|
|
||||||
'#Region "COMMANDS"
|
|
||||||
|
|
||||||
'#Region "CloseApplicationCommand"
|
|
||||||
|
|
||||||
' ' Returns a command that manage the MainWindow_Unloaded command
|
|
||||||
' 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
|
|
||||||
|
|
||||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
|
||||||
Friend Sub CloseApplication()
|
Friend Sub CloseApplication()
|
||||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
' gestisco la chiusura della simulazione
|
||||||
|
If Map.refRightPanelVM.SelPanel = RightPanelVM.Panels.SIMULATION AndAlso Not IsNothing(Map.refSimulationPanelVM) Then
|
||||||
|
Map.refSimulationPanelVM.MySimul.ResetSimulation()
|
||||||
|
End If
|
||||||
' Gestisco eventuale file corrente modificato
|
' Gestisco eventuale file corrente modificato
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
'bOk = ProjFileVM.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ)
|
'bOk = ProjFileVM.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ)
|
||||||
@@ -285,15 +177,63 @@ Public Class MainWindowVM
|
|||||||
' Se non confermata chiusura, esco
|
' Se non confermata chiusura, esco
|
||||||
If Not bAllowClose Then Return
|
If Not bAllowClose Then Return
|
||||||
' salvo modo di visualizzazione
|
' salvo modo di visualizzazione
|
||||||
WriteMainPrivateProfileString(S_SCENE, K_SHOWMODE, EgtGetShowMode().ToString)
|
WriteMainPrivateProfileString(S_SCENE, K_SHOWMODE, EgtGetShowMode().ToString())
|
||||||
|
' Salvo stato visualizzazione direzione curve
|
||||||
|
WriteMainPrivateProfileString(S_SCENE, K_CURVEDIR, If(EgtGetShowCurveDirection(), "1", "0"))
|
||||||
|
' Salvo stato visualizzazione griglia
|
||||||
|
WriteMainPrivateProfileString(S_GRID, K_SHOWGRID, If(Map.refMyStatusBarVM.bGridVisibility, "1", "0"))
|
||||||
' Termino il Model
|
' Termino il Model
|
||||||
m_MainWindowM.Close()
|
m_MainWindowM.Close()
|
||||||
' Termino il programma
|
' Termino il programma
|
||||||
Application.Current.Shutdown()
|
Application.Current.Shutdown()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'#End Region ' CloseApplicationCommand
|
#Region "COMMANDS"
|
||||||
|
|
||||||
'#End Region ' COMMANDS
|
#Region "AboutBoxCommand"
|
||||||
|
|
||||||
|
' Returns a command that manage the MainWindow_Unloaded command
|
||||||
|
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
|
||||||
|
|
||||||
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
|
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"
|
||||||
|
|
||||||
|
' Returns a command that manage the MainWindow_Unloaded command
|
||||||
|
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
|
||||||
|
|
||||||
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
|
Public Sub CloseApplication(ByVal param As Object)
|
||||||
|
If Map.refSliceManagerVM.bCalculating Then
|
||||||
|
MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
CloseApplication()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CloseApplicationCommand
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -0,0 +1,165 @@
|
|||||||
|
<Grid x:Class="ManagePartPanelV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:Icarus"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
Width="150"
|
||||||
|
VerticalAlignment="Stretch">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Margin="0,0,0,2.5"
|
||||||
|
Style="{StaticResource Title_Border}">
|
||||||
|
<TextBlock Text="PART MANAGER"
|
||||||
|
Style="{StaticResource Title_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Row="1"
|
||||||
|
Padding="0,2.5,0,0"
|
||||||
|
Margin="0,2.5,0,0"
|
||||||
|
Style="{StaticResource BottomGrayRow_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="Part Entity List"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource Title_TextBlock}"/>
|
||||||
|
<TreeView x:Name="ManagerPartTreeView"
|
||||||
|
Grid.Row="1"
|
||||||
|
ItemsSource="{Binding ManagerPartList}"
|
||||||
|
MinHeight="200"
|
||||||
|
IsEnabled="{Binding IsEnabled}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
FontSize="12"
|
||||||
|
Foreground="{StaticResource Icarus_Gray}">
|
||||||
|
<TreeView.Resources>
|
||||||
|
<HierarchicalDataTemplate DataType="{x:Type local:ManagePart_Part}"
|
||||||
|
ItemsSource="{Binding LayerList}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<!--<Image Source="/Resources/TreeView/Folder.png"
|
||||||
|
Height="15"/>-->
|
||||||
|
<Grid>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Visibility="{Binding TextBlock_Visibility}"
|
||||||
|
Style="{StaticResource BaseTextBlock}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding sName, UpdateSourceTrigger=Explicit}"
|
||||||
|
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
||||||
|
Visibility="{Binding TextBox_Visibility}"
|
||||||
|
Style="{StaticResource OptionTextBox}"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</HierarchicalDataTemplate>
|
||||||
|
<HierarchicalDataTemplate DataType="{x:Type local:ManagePart_Layer}"
|
||||||
|
ItemsSource="{Binding EntityList, UpdateSourceTrigger=PropertyChanged}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<!--<Image Source="/Resources/TreeView/Folder.png"
|
||||||
|
Height="15"/>-->
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Style="{StaticResource BaseTextBlock}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</HierarchicalDataTemplate>
|
||||||
|
<HierarchicalDataTemplate DataType="{x:Type local:PartManager_GeomEntity}">
|
||||||
|
<Grid>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Style="{StaticResource BaseTextBlock}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding sName, UpdateSourceTrigger=Explicit}"
|
||||||
|
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
||||||
|
Visibility="{Binding TextBox_Visibility}"
|
||||||
|
Style="{StaticResource OptionTextBox}"/>
|
||||||
|
</Grid>
|
||||||
|
</HierarchicalDataTemplate>
|
||||||
|
<!-- Menu' tasto destro -->
|
||||||
|
<ContextMenu x:Key="RowMenu"
|
||||||
|
ItemsSource="{Binding MenuList}"
|
||||||
|
Style="{StaticResource Icarus_ContextMenu}">
|
||||||
|
<ContextMenu.ItemContainerStyle>
|
||||||
|
<Style TargetType="MenuItem" BasedOn="{StaticResource Icarus_MenuItem}">
|
||||||
|
<Setter Property="Command" Value="{Binding MenuItem_Command}"/>
|
||||||
|
<Setter Property="Header" Value="{Binding sMsg}"/>
|
||||||
|
</Style>
|
||||||
|
</ContextMenu.ItemContainerStyle>
|
||||||
|
</ContextMenu>
|
||||||
|
</TreeView.Resources>
|
||||||
|
<TreeView.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource {x:Type TreeViewItem}}">
|
||||||
|
<Setter Property="IsSelected" Value="{Binding bIsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<Setter Property="IsExpanded" Value="True"/>
|
||||||
|
<Setter Property="ContextMenu" Value="{StaticResource RowMenu}"/>
|
||||||
|
<Setter Property="ContextMenuService.Placement" Value="Right"/>
|
||||||
|
<EventSetter Event="ContextMenuOpening" Handler="Item_ContextMenuOpening"/>
|
||||||
|
</Style>
|
||||||
|
</TreeView.ItemContainerStyle>
|
||||||
|
</TreeView>
|
||||||
|
<TextBlock Grid.Row="2"
|
||||||
|
Text="Imported Entity List"
|
||||||
|
Visibility="{Binding IsImport_Visibility}"
|
||||||
|
Margin="0,2.5,0,2.5"
|
||||||
|
Style="{StaticResource Title_TextBlock}"/>
|
||||||
|
<ListBox Grid.Row="3"
|
||||||
|
ItemsSource="{Binding ImportedEntityList, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
SelectedItem="{Binding SelImportedEntity}"
|
||||||
|
MinHeight="100"
|
||||||
|
IsEnabled="{Binding IsEnabled}"
|
||||||
|
Visibility="{Binding IsImport_Visibility}"
|
||||||
|
Margin="0,2.5,0,2.5">
|
||||||
|
<ListBox.Resources>
|
||||||
|
<!-- Menu' tasto destro -->
|
||||||
|
<ContextMenu x:Key="RowMenu"
|
||||||
|
ItemsSource="{Binding MenuList}"
|
||||||
|
Style="{StaticResource Icarus_ContextMenu}">
|
||||||
|
<ContextMenu.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource Icarus_MenuItem}">
|
||||||
|
<Setter Property="Command" Value="{Binding MenuItem_Command}"/>
|
||||||
|
<Setter Property="Header" Value="{Binding sMsg}"/>
|
||||||
|
</Style>
|
||||||
|
</ContextMenu.ItemContainerStyle>
|
||||||
|
</ContextMenu>
|
||||||
|
</ListBox.Resources>
|
||||||
|
<ListBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListBoxItem">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="ContextMenu" Value="{StaticResource RowMenu}" />
|
||||||
|
<Setter Property="ContextMenuService.Placement" Value="Right" />
|
||||||
|
<Setter Property="ContextMenuService.VerticalOffset" Value="-3" />
|
||||||
|
</Style>
|
||||||
|
</ListBox.ItemContainerStyle>
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid HorizontalAlignment="Stretch">
|
||||||
|
<Grid.InputBindings>
|
||||||
|
<MouseBinding Gesture="LeftDoubleClick"
|
||||||
|
Command="{Binding GeomEntityDoubleClick_Command}"/>
|
||||||
|
</Grid.InputBindings>
|
||||||
|
<TextBlock Text="{Binding ghName}">
|
||||||
|
</TextBlock>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
<UniformGrid Grid.Row="4"
|
||||||
|
Rows="1"
|
||||||
|
IsEnabled="{Binding IsEnabled}"
|
||||||
|
Margin="0,2.5,0,0">
|
||||||
|
<Button Command="{Binding Ok_Command}"
|
||||||
|
IsDefault="True"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding Cancel_Command}"
|
||||||
|
Visibility="{Binding IsImport_Visibility}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Cancel.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</UniformGrid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
Public Class ManagePartPanelV
|
||||||
|
|
||||||
|
Protected Sub Item_ContextMenuOpening(sender As Object, e As ContextMenuEventArgs)
|
||||||
|
Dim PartItem As ManagePart_Part
|
||||||
|
Dim LayerItem As ManagePart_Layer
|
||||||
|
Dim EntityItem As PartManager_GeomEntity
|
||||||
|
Select Case e.OriginalSource.DataContext.GetType()
|
||||||
|
Case GetType(ManagePart_Part)
|
||||||
|
PartItem = DirectCast(e.OriginalSource.DataContext, ManagePart_Part)
|
||||||
|
If PartItem.MenuList.Count = 0 Then
|
||||||
|
e.Handled = True
|
||||||
|
End If
|
||||||
|
Case GetType(ManagePart_Layer)
|
||||||
|
LayerItem = DirectCast(e.OriginalSource.DataContext, ManagePart_Layer)
|
||||||
|
If LayerItem.Type <> ManagePart_Layer.LayerType.PRINT_SOLID OrElse LayerItem.MenuList.Count = 0 Then
|
||||||
|
e.Handled = True
|
||||||
|
End If
|
||||||
|
Case GetType(PartManager_GeomEntity)
|
||||||
|
EntityItem = DirectCast(e.OriginalSource.DataContext, PartManager_GeomEntity)
|
||||||
|
If EntityItem.MenuList.Count = 0 Then
|
||||||
|
e.Handled = True
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,528 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class ManagePartPanelVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Enum ManagePartType
|
||||||
|
IMPORT = 1
|
||||||
|
MODIFY = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_Type As ManagePartType
|
||||||
|
Friend ReadOnly Property Type As ManagePartType
|
||||||
|
Get
|
||||||
|
Return m_Type
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nImportedPartId As Integer = GDB_ID.NULL
|
||||||
|
Friend ReadOnly Property nImportedPartId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nImportedPartId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_ImportedEntityList As New ObservableCollection(Of PartManager_GeomEntity)
|
||||||
|
Public Property ImportedEntityList As ObservableCollection(Of PartManager_GeomEntity)
|
||||||
|
Get
|
||||||
|
Return m_ImportedEntityList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of PartManager_GeomEntity))
|
||||||
|
m_ImportedEntityList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelImportedEntity As PartManager_GeomEntity
|
||||||
|
Public Property SelImportedEntity As PartManager_GeomEntity
|
||||||
|
Get
|
||||||
|
Return m_SelImportedEntity
|
||||||
|
End Get
|
||||||
|
Set(value As PartManager_GeomEntity)
|
||||||
|
m_SelImportedEntity = value
|
||||||
|
EgtDeselectAll()
|
||||||
|
If Not IsNothing(m_SelImportedEntity) Then
|
||||||
|
EgtSelectObj(m_SelImportedEntity.nId)
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelImportedEntity(nId As Integer)
|
||||||
|
Dim SelEntity As PartManager_GeomEntity = Nothing
|
||||||
|
' cerco tra entita' importate
|
||||||
|
SelEntity = m_ImportedEntityList.FirstOrDefault(Function(x) x.nId = nId)
|
||||||
|
If IsNothing(SelEntity) Then
|
||||||
|
' cerco tra pezzi creati
|
||||||
|
For Each ManagePart In m_ManagerPartList
|
||||||
|
For Each Layer In ManagePart.LayerList
|
||||||
|
SelEntity = Layer.EntityList.FirstOrDefault(Function(x) x.nId = nId)
|
||||||
|
If Not IsNothing(SelEntity) Then
|
||||||
|
SelEntity.bIsSelected = True
|
||||||
|
SelEntity.NotifyPropertyChanged(NameOf(SelEntity.bIsSelected))
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not IsNothing(SelEntity) Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
m_SelImportedEntity = SelEntity
|
||||||
|
EgtDeselectAll()
|
||||||
|
If Not IsNothing(m_SelImportedEntity) Then
|
||||||
|
EgtSelectObj(m_SelImportedEntity.nId)
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(SelImportedEntity))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_ManagerPartList As New ObservableCollection(Of ManagePart_Part)
|
||||||
|
Public ReadOnly Property ManagerPartList As ObservableCollection(Of ManagePart_Part)
|
||||||
|
Get
|
||||||
|
Return m_ManagerPartList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelManagerPart As ManagePart_Part
|
||||||
|
Friend Sub SetSelManagerPart(SelManagePart_Part As ManagePart_Part)
|
||||||
|
m_SelManagerPart = SelManagePart_Part
|
||||||
|
m_SelManagerLayer = Nothing
|
||||||
|
End Sub
|
||||||
|
Public ReadOnly Property SelManagerPart As ManagePart_Part
|
||||||
|
Get
|
||||||
|
Return m_SelManagerPart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelManagerLayer As ManagePart_Layer
|
||||||
|
Public ReadOnly Property SelManagerLayer As ManagePart_Layer
|
||||||
|
Get
|
||||||
|
Return m_SelManagerLayer
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelManagerLayer(SelManagePart_Layer As ManagePart_Layer)
|
||||||
|
m_SelManagerPart = m_ManagerPartList.FirstOrDefault(Function(x) x.LayerList.Contains(SelManagePart_Layer))
|
||||||
|
m_SelManagerLayer = SelManagePart_Layer
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_SelPartManager_GeomEntity As PartManager_GeomEntity
|
||||||
|
Public ReadOnly Property SelPartManager_GeomEntity As PartManager_GeomEntity
|
||||||
|
Get
|
||||||
|
Return m_SelPartManager_GeomEntity
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelPartManager_GeomEntity(SelPartManager_GeomEntity As PartManager_GeomEntity)
|
||||||
|
For Each CurrPart In m_ManagerPartList
|
||||||
|
Dim CurrLayer As ManagePart_Layer = CurrPart.LayerList.FirstOrDefault(Function(x) x.EntityList.Contains(SelPartManager_GeomEntity))
|
||||||
|
If Not IsNothing(CurrLayer) Then
|
||||||
|
m_SelManagerPart = CurrPart
|
||||||
|
m_SelManagerLayer = CurrLayer
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
m_SelPartManager_GeomEntity = SelPartManager_GeomEntity
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public ReadOnly Property IsImport_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Select Case m_Type
|
||||||
|
Case ManagePartType.IMPORT
|
||||||
|
Return Visibility.Visible
|
||||||
|
Case Else ' ManagePartType.MODIFY
|
||||||
|
Return Visibility.Collapsed
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_IsEnabled As Boolean = True
|
||||||
|
Public ReadOnly Property IsEnabled As Boolean
|
||||||
|
Get
|
||||||
|
Return m_IsEnabled
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetIsEnabled(value As Boolean)
|
||||||
|
m_IsEnabled = value
|
||||||
|
NotifyPropertyChanged(NameOf(IsEnabled))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdSetReference As ICommand
|
||||||
|
Private m_cmdAddPart As ICommand
|
||||||
|
Private m_cmdRemovePart As ICommand
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
Private m_cmdCancel As ICommand
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in EgtCAM5Map
|
||||||
|
Map.SetRefManagePartPanelVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Friend Sub Init(Type As ManagePartType)
|
||||||
|
m_Type = Type
|
||||||
|
Select Case Type
|
||||||
|
Case ManagePartType.IMPORT
|
||||||
|
' import
|
||||||
|
m_ImportedEntityList.Clear()
|
||||||
|
m_ManagerPartList.Clear()
|
||||||
|
' aggiungo geometrie importate a lista
|
||||||
|
m_nImportedPartId = EgtGetLastPart()
|
||||||
|
Dim nLayerId As Integer = EgtGetFirstLayer(m_nImportedPartId)
|
||||||
|
Dim nGeometryId As Integer = EgtGetFirstInGroup(nLayerId)
|
||||||
|
While nGeometryId <> GDB_ID.NULL
|
||||||
|
Dim sGeometryName As String = ""
|
||||||
|
EgtGetName(nGeometryId, sGeometryName)
|
||||||
|
m_ImportedEntityList.Add(New PartManager_GeomEntity(Nothing, nGeometryId))
|
||||||
|
nGeometryId = EgtGetNext(nGeometryId)
|
||||||
|
End While
|
||||||
|
' aggiungo primo pezzo
|
||||||
|
m_ManagerPartList.Add(New ManagePart_Part(Nothing))
|
||||||
|
m_ManagerPartList(0).LayerList.FirstOrDefault(Function(x) x.Type = ManagePart_Layer.LayerType.PRINT_SOLID).bIsSelected = True
|
||||||
|
' aggiorno i contextmenu di tutti gli entity
|
||||||
|
UpdateAllEntityContextMenu()
|
||||||
|
Case ManagePartType.MODIFY
|
||||||
|
' modify
|
||||||
|
m_ImportedEntityList.Clear()
|
||||||
|
m_ManagerPartList.Clear()
|
||||||
|
' carico pezzi in lista
|
||||||
|
For Each PrintPart In Map.refTopPanelVM.PartList
|
||||||
|
m_ManagerPartList.Add(New ManagePart_Part(PrintPart))
|
||||||
|
Next
|
||||||
|
End Select
|
||||||
|
NotifyPropertyChanged(NameOf(IsImport_Visibility))
|
||||||
|
EgtDeselectAll()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub UpdateAllEntityContextMenu()
|
||||||
|
' aggiorno i contextmenu di tutti gli entity
|
||||||
|
For Each ManagePart In m_ManagerPartList
|
||||||
|
For Each Layer In ManagePart.LayerList
|
||||||
|
For Each Entity In Layer.EntityList
|
||||||
|
Entity.UpdateContextMenu()
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
For Each Entity In ImportedEntityList
|
||||||
|
Entity.UpdateContextMenu()
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "AddPart"
|
||||||
|
|
||||||
|
Public ReadOnly Property AddPart_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdAddPart Is Nothing Then
|
||||||
|
m_cmdAddPart = New Command(AddressOf AddPart)
|
||||||
|
End If
|
||||||
|
Return m_cmdAddPart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub AddPart()
|
||||||
|
m_ManagerPartList.Add(New ManagePart_Part(Nothing))
|
||||||
|
' aggiorno i contextmenu di tutti gli entity
|
||||||
|
UpdateAllEntityContextMenu()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' AddPart
|
||||||
|
|
||||||
|
#Region "RemovePart"
|
||||||
|
|
||||||
|
Public ReadOnly Property RemovePart_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdRemovePart Is Nothing Then
|
||||||
|
m_cmdRemovePart = New Command(AddressOf RemovePart)
|
||||||
|
End If
|
||||||
|
Return m_cmdRemovePart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub RemovePart()
|
||||||
|
If IsNothing(SelManagerLayer) AndAlso m_ManagerPartList.Count > 1 Then
|
||||||
|
' rimuovo pezzo
|
||||||
|
m_ManagerPartList.Remove(SelManagerPart)
|
||||||
|
'Else
|
||||||
|
' ' rimuovo geometria
|
||||||
|
' Dim CurrEntity As PartManager_GeomEntity = m_SelPartManager_GeomEntity
|
||||||
|
' SelManagerLayer.EntityList.Remove(m_SelPartManager_GeomEntity)
|
||||||
|
' ' la rimetto in lista importati
|
||||||
|
' ImportedEntityList.Add(CurrEntity)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' RemovePart
|
||||||
|
|
||||||
|
#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()
|
||||||
|
Select Case m_Type
|
||||||
|
Case ManagePartType.IMPORT
|
||||||
|
Dim sErr As New List(Of String)
|
||||||
|
' verifico che tutti i pezzi abbiano una superficie da stampare nel layer apposito
|
||||||
|
For Each CurrPart In m_ManagerPartList
|
||||||
|
For Each CurrLayer In CurrPart.LayerList
|
||||||
|
Select Case CurrLayer.Type
|
||||||
|
Case ManagePart_Layer.LayerType.PRINT_SOLID
|
||||||
|
If CurrLayer.EntityList.Count = 0 Then
|
||||||
|
If sErr.Count > 0 Then sErr(sErr.Count - 1) &= Environment.NewLine
|
||||||
|
sErr.Add(CurrPart.sName & " - No print surface defined!")
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
If sErr.Count > 0 Then
|
||||||
|
MessageBox.Show(String.Concat(sErr), "Error")
|
||||||
|
Return
|
||||||
|
Else
|
||||||
|
' Creo pezzi e layer necessari
|
||||||
|
For ManagePart_PartIndex = 0 To m_ManagerPartList.Count - 1
|
||||||
|
Dim ManagePart_Part As ManagePart_Part = m_ManagerPartList(ManagePart_PartIndex)
|
||||||
|
Dim frImportedPart As New Frame3d
|
||||||
|
EgtGetGroupGlobFrame(m_nImportedPartId, frImportedPart)
|
||||||
|
Dim nPartId As Integer = EgtCreateGroup(GDB_ID.ROOT, frImportedPart)
|
||||||
|
EgtSetName(nPartId, PART)
|
||||||
|
Dim nFrameId As Integer = GDB_ID.NULL
|
||||||
|
Dim b3PrintSolid As New BBox3d
|
||||||
|
Dim nPrintPartLayerId As Integer = GDB_ID.NULL
|
||||||
|
Dim PrintSolidEntity As PartManager_GeomEntity = Nothing
|
||||||
|
Dim nRibsLayerId As Integer = GDB_ID.NULL
|
||||||
|
Dim nShellNumberLayerId As Integer = GDB_ID.NULL
|
||||||
|
Dim nAuxSolidsLayerId As Integer = GDB_ID.NULL
|
||||||
|
Dim nMachStartLayerId As Integer = GDB_ID.NULL
|
||||||
|
Dim nOthersLayerId As Integer = GDB_ID.NULL
|
||||||
|
For Each ManagePart_Layer In ManagePart_Part.LayerList
|
||||||
|
Select Case ManagePart_Layer.Type
|
||||||
|
Case ManagePart_Layer.LayerType.PRINT_SOLID
|
||||||
|
nPrintPartLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nPrintPartLayerId, PRINT_SOLID)
|
||||||
|
EgtSetColor(nPrintPartLayerId, GeomEntityColors.c3Print)
|
||||||
|
If ManagePart_Layer.EntityList.Count > 0 Then
|
||||||
|
PrintSolidEntity = ManagePart_Layer.EntityList(0)
|
||||||
|
EgtRelocateGlob(PrintSolidEntity.nId, nPrintPartLayerId, GDB_POS.LAST_SON)
|
||||||
|
' calcolo box superficie per creazione riferimento
|
||||||
|
EgtGetBBoxGlob(PrintSolidEntity.nId, GDB_BB.STANDARD, b3PrintSolid)
|
||||||
|
' elimino colore entita' e rendo visibile
|
||||||
|
EgtResetColor(PrintSolidEntity.nId)
|
||||||
|
EgtSetStatus(PrintSolidEntity.nId, GDB_ST.ON_)
|
||||||
|
If PrintSolidEntity.sName <> PrintSolidEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PrintSolidEntity.nId, ENTITY_NAME, PrintSolidEntity.sName)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case ManagePart_Layer.LayerType.MACH_START
|
||||||
|
nMachStartLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nMachStartLayerId, LAY_MACH_START)
|
||||||
|
EgtSetColor(nMachStartLayerId, GeomEntityColors.c3MachStart)
|
||||||
|
Dim nMachStartId As Integer = GDB_ID.NULL
|
||||||
|
If ManagePart_Layer.EntityList.Count > 0 Then
|
||||||
|
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||||
|
' se punto o curva compo
|
||||||
|
Dim EntityType As GDB_TY = EgtGetType(PartManager_GeomEntity.nId)
|
||||||
|
Select Case EntityType
|
||||||
|
Case GDB_TY.GEO_POINT, GDB_TY.CRV_COMPO
|
||||||
|
' gli cambio layer
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nMachStartLayerId, GDB_POS.LAST_SON)
|
||||||
|
nMachStartId = PartManager_GeomEntity.nId
|
||||||
|
Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
|
||||||
|
' altrimenti la trasformo in curva compo
|
||||||
|
nMachStartId = EgtCreateCurveCompo(nMachStartLayerId, PartManager_GeomEntity.nId, True)
|
||||||
|
End Select
|
||||||
|
EgtSetName(nMachStartId, START_GEOM)
|
||||||
|
' elimino colore entita' e rendo visibile
|
||||||
|
EgtResetColor(nMachStartId)
|
||||||
|
EgtSetStatus(nMachStartId, GDB_ST.ON_)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
' creo punto di partenza
|
||||||
|
Dim ptStart As Point3d = b3PrintSolid.Center() - 0.6 * b3PrintSolid.DimY() * Vector3d.Y_AX() - 0.5 * b3PrintSolid.DimZ() * Vector3d.Z_AX()
|
||||||
|
nMachStartId = EgtCreateGeoPoint(nMachStartLayerId, ptStart, GDB_RT.GLOB)
|
||||||
|
EgtSetName(nMachStartId, START_GEOM)
|
||||||
|
' elimino colore entita' e rendo visibile
|
||||||
|
EgtResetColor(nMachStartId)
|
||||||
|
EgtSetStatus(nMachStartId, GDB_ST.ON_)
|
||||||
|
End If
|
||||||
|
Case ManagePart_Layer.LayerType.RIBS
|
||||||
|
nRibsLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nRibsLayerId, LAY_RIBS)
|
||||||
|
EgtSetColor(nRibsLayerId, GeomEntityColors.c3Rib)
|
||||||
|
Dim nRibsIndex As Integer = 1
|
||||||
|
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, KEY_RIB_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, RIB_ID, nRibsIndex)
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nRibsLayerId, GDB_POS.LAST_SON)
|
||||||
|
' elimino colore entita' e rendo visibile
|
||||||
|
EgtResetColor(PartManager_GeomEntity.nId)
|
||||||
|
EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
nRibsIndex += 1
|
||||||
|
Next
|
||||||
|
Case ManagePart_Layer.LayerType.SHELL_NUMBER
|
||||||
|
nShellNumberLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nShellNumberLayerId, LAY_SHELL_NBR)
|
||||||
|
EgtSetColor(nShellNumberLayerId, GeomEntityColors.c3ShellNumber)
|
||||||
|
Dim nShellNumberIndex As Integer = 1
|
||||||
|
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, KEY_SHELLNBR_TYPE, ShellNumberEntity.ShellNumberTypes.FROMIMPORT)
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, SHELLNUMBER_ID, nShellNumberIndex)
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nShellNumberLayerId, GDB_POS.LAST_SON)
|
||||||
|
' elimino colore entita' e rendo visibile
|
||||||
|
EgtResetColor(PartManager_GeomEntity.nId)
|
||||||
|
EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
nShellNumberIndex += 1
|
||||||
|
Next
|
||||||
|
Case ManagePart_Layer.LayerType.AUX_SOLIDS
|
||||||
|
nAuxSolidsLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nAuxSolidsLayerId, LAY_AUX_SOLIDS)
|
||||||
|
EgtSetColor(nAuxSolidsLayerId, GeomEntityColors.c3AuxSolids)
|
||||||
|
Dim nFilledSolidIndex As Integer = 1
|
||||||
|
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, KEY_AUXSOLID_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, FILLEDSOLID_ID, nFilledSolidIndex)
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nAuxSolidsLayerId, GDB_POS.LAST_SON)
|
||||||
|
' elimino colore entita' e rendo visibile
|
||||||
|
EgtResetColor(PartManager_GeomEntity.nId)
|
||||||
|
EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
nFilledSolidIndex += 1
|
||||||
|
Next
|
||||||
|
Case ManagePart_Layer.LayerType.OTHERS
|
||||||
|
nOthersLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nOthersLayerId, LAY_OTHERS)
|
||||||
|
EgtSetColor(nOthersLayerId, GeomEntityColors.c3Others)
|
||||||
|
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON)
|
||||||
|
' elimino colore entita' e rendo visibile
|
||||||
|
EgtResetColor(PartManager_GeomEntity.nId)
|
||||||
|
EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If ManagePart_PartIndex = 0 Then
|
||||||
|
For Each PartManager_GeomEntity In ImportedEntityList
|
||||||
|
' se curva
|
||||||
|
Dim EntityType As GDB_TY = EgtGetType(PartManager_GeomEntity.nId)
|
||||||
|
Select Case EntityType
|
||||||
|
Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
|
||||||
|
' la trasformo in curva compo
|
||||||
|
Dim nOtherId As Integer = EgtCreateCurveCompo(nOthersLayerId, PartManager_GeomEntity.nId, True)
|
||||||
|
' elimino colore entita' e rendo visibile
|
||||||
|
EgtResetColor(PartManager_GeomEntity.nId)
|
||||||
|
EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(nOtherId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
Case Else
|
||||||
|
' altrimenti la sposto solamente
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON)
|
||||||
|
' elimino colore entita' e rendo visibile
|
||||||
|
EgtResetColor(PartManager_GeomEntity.nId)
|
||||||
|
EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
' aggiungo layer riferimento
|
||||||
|
Dim nPartReferenceLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nPartReferenceLayerId, LAY_PARTREFERENCE)
|
||||||
|
Dim nReferenceLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nReferenceLayerId, LAY_REFERENCE)
|
||||||
|
EgtSetInfo(nReferenceLayerId, KEY_REFERENCE, ReferenceBtn.References.BL)
|
||||||
|
' appoggio il pezzo sulla tavola
|
||||||
|
EgtMove(nPartId, New Vector3d(0, 0, -b3PrintSolid.Min.z))
|
||||||
|
' lo aggiungo a lista pezzi
|
||||||
|
Dim sFilePath As String = ""
|
||||||
|
EgtGetInfo(m_nImportedPartId, FILE_PATH, sFilePath)
|
||||||
|
EgtSetInfo(nPartId, FILE_PATH, sFilePath)
|
||||||
|
EgtSetInfo(nPartId, PART_NAME, ManagePart_Part.sName)
|
||||||
|
EgtSetInfo(nPartId, "PartOnTable", 1)
|
||||||
|
Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nPartReferenceLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
|
||||||
|
Map.refTopPanelVM.PartList.Add(NewPart)
|
||||||
|
' aggiorno riferimento
|
||||||
|
Map.refReferencePanelVM.UpdateFramePosition(NewPart)
|
||||||
|
Map.refSliceManagerVM.UpdateDimensions()
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
'EgtAddMachGroup("3dPrint")
|
||||||
|
'EgtSetTable("Tab")
|
||||||
|
|
||||||
|
'Dim nRawId As Integer = EgtAddRawPart(b3PrintSolid.Min, b3PrintSolid.DimX, b3PrintSolid.DimY, b3PrintSolid.DimZ, New Color3d(128, 128, 128, 30))
|
||||||
|
'EgtAddPartToRawPart(nPartId, b3PrintSolid.Min, nRawId)
|
||||||
|
'EgtMoveToCornerRawPart(nRawId, New Point3d(dPosX, dPosY, 0), MCH_CR.BL)
|
||||||
|
|
||||||
|
'EgtResetCurrMachGroup()
|
||||||
|
|
||||||
|
' seleziono ultimo pezzo aggiunto
|
||||||
|
Map.refTopPanelVM.SelLastPart()
|
||||||
|
' elimino vecchio pezzo d'importazione
|
||||||
|
EgtErase(m_nImportedPartId)
|
||||||
|
|
||||||
|
Case ManagePartType.MODIFY
|
||||||
|
' nulla da fare
|
||||||
|
End Select
|
||||||
|
EgtDeselectAll()
|
||||||
|
EgtDraw()
|
||||||
|
' ripristino modalita' standard
|
||||||
|
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Ok
|
||||||
|
|
||||||
|
#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()
|
||||||
|
' elimino pezzo importato
|
||||||
|
EgtErase(m_nImportedPartId)
|
||||||
|
EgtDeselectAll()
|
||||||
|
EgtDraw()
|
||||||
|
' se ci sono pezzi
|
||||||
|
If Map.refTopPanelVM.PartList.Count > 0 Then
|
||||||
|
' ripristino modalita' standard
|
||||||
|
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||||
|
Else
|
||||||
|
Map.refTopPanelVM.SelPage = Pages.NULL
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Cancel
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -21,7 +21,7 @@ Public Class Material
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Friend Sub UpdateIsModified()
|
Friend Sub UpdateIsModified()
|
||||||
m_bIsModified = m_CathegoryList.Any(Function(x) x.MaterialParamList.Any(Function(y) y.bIsModified))
|
m_bIsModified = m_CathegoryList.Any(Function(x) x.MaterialParamList.Any(Function(y) y.bIsModified)) OrElse bIsModifiedName
|
||||||
NotifyPropertyChanged(NameOf(ghName))
|
NotifyPropertyChanged(NameOf(ghName))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -31,23 +31,32 @@ Public Class Material
|
|||||||
Return m_nIndex
|
Return m_nIndex
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Friend Sub SetIndex(nValue As Integer)
|
||||||
|
m_nIndex = nValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private m_sGUID As String
|
Private m_sGUID As String
|
||||||
Public ReadOnly Property sGUID As String
|
Public Property sGUID As String
|
||||||
Get
|
Get
|
||||||
Return m_sGUID
|
Return m_sGUID
|
||||||
End Get
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sGUID = value
|
||||||
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_sOrigName As String = ""
|
||||||
Private m_sName As String
|
Private m_sName As String
|
||||||
Public Property sName As String
|
Public Property sName As String
|
||||||
Get
|
Get
|
||||||
Return m_sName
|
Return m_sName
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
|
Dim bIsModified As Boolean = m_sName <> value
|
||||||
m_sName = value
|
m_sName = value
|
||||||
Map.refMaterialDbVM.SetNameVisibility(False)
|
Map.refMaterialDbVM.SetNameVisibility(False)
|
||||||
NotifyPropertyChanged(NameOf(ghName))
|
If bIsModified Then UpdateIsModified()
|
||||||
|
Map.refMaterialDbVM.SetIsEnabled(True)
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property ghName As String
|
Public ReadOnly Property ghName As String
|
||||||
@@ -55,95 +64,9 @@ Public Class Material
|
|||||||
Return m_sName & If(m_bIsModified, "*", "")
|
Return m_sName & If(m_bIsModified, "*", "")
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property bIsModifiedName As Boolean
|
||||||
Private m_dK As Double
|
|
||||||
Public ReadOnly Property dK As Double
|
|
||||||
Get
|
Get
|
||||||
Return m_dK
|
Return m_sName <> m_sOrigName
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dC1 As Double
|
|
||||||
Public ReadOnly Property dC1 As Double
|
|
||||||
Get
|
|
||||||
Return m_dC1
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dC2 As Double
|
|
||||||
Public ReadOnly Property dC2 As Double
|
|
||||||
Get
|
|
||||||
Return m_dC2
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dDensity As Double
|
|
||||||
Public ReadOnly Property dDensity As Double
|
|
||||||
Get
|
|
||||||
Return m_dDensity
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dAMax As Double
|
|
||||||
Public ReadOnly Property dAMax As Double
|
|
||||||
Get
|
|
||||||
Return m_dAMax
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dATrg As Double
|
|
||||||
Public ReadOnly Property dATrg As Double
|
|
||||||
Get
|
|
||||||
Return m_dATrg
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dAMin As Double
|
|
||||||
Public ReadOnly Property dAMin As Double
|
|
||||||
Get
|
|
||||||
Return m_dAMin
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dBMax As Double
|
|
||||||
Public ReadOnly Property dBMax As Double
|
|
||||||
Get
|
|
||||||
Return m_dBMax
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dBTrg As Double
|
|
||||||
Public ReadOnly Property dBTrg As Double
|
|
||||||
Get
|
|
||||||
Return m_dBTrg
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dBMin As Double
|
|
||||||
Public ReadOnly Property dBMin As Double
|
|
||||||
Get
|
|
||||||
Return m_dBMin
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dKW As Double
|
|
||||||
Friend ReadOnly Property dKW As Double
|
|
||||||
Get
|
|
||||||
Return m_dKW
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dKZ As Double
|
|
||||||
Friend ReadOnly Property dKZ As Double
|
|
||||||
Get
|
|
||||||
Return m_dKZ
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_dKN As Double
|
|
||||||
Friend ReadOnly Property dKN As Double
|
|
||||||
Get
|
|
||||||
Return m_dKN
|
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -152,6 +75,7 @@ Public Class Material
|
|||||||
m_nIndex = nIndex
|
m_nIndex = nIndex
|
||||||
ReadMaterialParamString(nIndex, MAT_GUID, "", m_sGUID)
|
ReadMaterialParamString(nIndex, MAT_GUID, "", m_sGUID)
|
||||||
ReadMaterialParamString(nIndex, MAT_NAME, "", m_sName)
|
ReadMaterialParamString(nIndex, MAT_NAME, "", m_sName)
|
||||||
|
m_sOrigName = m_sName
|
||||||
'EgtGetStringUtf8FromIni(nIndex, MAT_NAME, "", m_sName, sMatIniFilePath)
|
'EgtGetStringUtf8FromIni(nIndex, MAT_NAME, "", m_sName, sMatIniFilePath)
|
||||||
m_CathegoryList.Add(New MaterialCathegory(MaterialCathegory.Cathegories.GENERAL, nIndex))
|
m_CathegoryList.Add(New MaterialCathegory(MaterialCathegory.Cathegories.GENERAL, nIndex))
|
||||||
m_CathegoryList.Add(New MaterialCathegory(MaterialCathegory.Cathegories.TEMPERATURES, nIndex))
|
m_CathegoryList.Add(New MaterialCathegory(MaterialCathegory.Cathegories.TEMPERATURES, nIndex))
|
||||||
@@ -167,7 +91,8 @@ Public Class Material
|
|||||||
Sub New()
|
Sub New()
|
||||||
m_nIndex = Map.refMaterialDbVM.MaterialList.Max(Function(x) x.nIndex) + 1
|
m_nIndex = Map.refMaterialDbVM.MaterialList.Max(Function(x) x.nIndex) + 1
|
||||||
m_sGUID = Guid.NewGuid.ToString()
|
m_sGUID = Guid.NewGuid.ToString()
|
||||||
m_sName = "New Material Param"
|
m_sName = "New Material"
|
||||||
|
m_sOrigName = m_sName
|
||||||
Dim nCopyIndex As Integer = Map.refMaterialDbVM.SelMaterial.m_nIndex
|
Dim nCopyIndex As Integer = Map.refMaterialDbVM.SelMaterial.m_nIndex
|
||||||
m_CathegoryList.Add(New MaterialCathegory(MaterialCathegory.Cathegories.GENERAL, nCopyIndex))
|
m_CathegoryList.Add(New MaterialCathegory(MaterialCathegory.Cathegories.GENERAL, nCopyIndex))
|
||||||
Dim Orig As StringMaterialParam = m_CathegoryList(0).MaterialParamList.FirstOrDefault(Function(x) x.Type = MaterialParam.Params.ORIG)
|
Dim Orig As StringMaterialParam = m_CathegoryList(0).MaterialParamList.FirstOrDefault(Function(x) x.Type = MaterialParam.Params.ORIG)
|
||||||
@@ -184,27 +109,8 @@ Public Class Material
|
|||||||
m_bIsModified = True
|
m_bIsModified = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub New(nIndex As Integer, sGUID As String, sName As String)
|
|
||||||
m_nIndex = nIndex
|
|
||||||
m_sName = sName
|
|
||||||
m_sGUID = sGUID
|
|
||||||
m_dK = ReadMaterialParamDouble(m_nIndex, MAT_K, 0)
|
|
||||||
m_dC1 = ReadMaterialParamDouble(m_nIndex, MAT_C1, 0)
|
|
||||||
m_dC2 = ReadMaterialParamDouble(m_nIndex, MAT_C2, 0)
|
|
||||||
m_dDensity = ReadMaterialParamDouble(m_nIndex, MAT_DENSITY, 0)
|
|
||||||
m_dAMax = ReadMaterialParamDouble(m_nIndex, MAT_AMAX, 0)
|
|
||||||
m_dATrg = ReadMaterialParamDouble(m_nIndex, MAT_ATRG, 0)
|
|
||||||
m_dAMin = ReadMaterialParamDouble(m_nIndex, MAT_AMIN, 0)
|
|
||||||
m_dBMax = ReadMaterialParamDouble(m_nIndex, MAT_BMAX, 0)
|
|
||||||
m_dBTrg = ReadMaterialParamDouble(m_nIndex, MAT_BTRG, 0)
|
|
||||||
m_dBMin = ReadMaterialParamDouble(m_nIndex, MAT_BMIN, 0)
|
|
||||||
m_dKW = ReadMaterialParamDouble(m_nIndex, MAT_KW, 0)
|
|
||||||
m_dKZ = ReadMaterialParamDouble(m_nIndex, MAT_KZ, 0)
|
|
||||||
m_dKN = ReadMaterialParamDouble(m_nIndex, MAT_KN, 0)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ReadAllParams()
|
Private Sub ReadAllParams()
|
||||||
'm_bSlicing45 = ReadMaterialParamDouble(m_nIndex, MAC_SLICING45, 0, CurrentMachine.sMachiningFilePath)
|
'm_nSlicingType = ReadMaterialParamDouble(m_nIndex, MAC_SLICINGTYPE, 0, CurrentMachine.sMachiningFilePath)
|
||||||
'm_dStrandH = ReadMaterialParamDouble(m_nIndex, MAC_STRANDH, 0, CurrentMachine.sMachiningFilePath)
|
'm_dStrandH = ReadMaterialParamDouble(m_nIndex, MAC_STRANDH, 0, CurrentMachine.sMachiningFilePath)
|
||||||
'm_dStrandW = ReadMaterialParamDouble(m_nIndex, MAC_STRANDW, 0, CurrentMachine.sMachiningFilePath)
|
'm_dStrandW = ReadMaterialParamDouble(m_nIndex, MAC_STRANDW, 0, CurrentMachine.sMachiningFilePath)
|
||||||
'm_nStrandCount = ReadMaterialParamDouble(m_nIndex, MAC_STRANDCOUNT, 0, CurrentMachine.sMachiningFilePath)
|
'm_nStrandCount = ReadMaterialParamDouble(m_nIndex, MAC_STRANDCOUNT, 0, CurrentMachine.sMachiningFilePath)
|
||||||
@@ -243,6 +149,16 @@ Public Class Material
|
|||||||
'm_dRibsLeadOutWipeDir = ReadMaterialParamDouble(m_nIndex, MAC_RIBSLEADOUTWIPEDIR, 0, CurrentMachine.sMachiningFilePath)
|
'm_dRibsLeadOutWipeDir = ReadMaterialParamDouble(m_nIndex, MAC_RIBSLEADOUTWIPEDIR, 0, CurrentMachine.sMachiningFilePath)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SaveName()
|
||||||
|
m_sOrigName = m_sName
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ResetName()
|
||||||
|
m_sName = m_sOrigName
|
||||||
|
NotifyPropertyChanged(NameOf(ghName))
|
||||||
|
NotifyPropertyChanged(NameOf(sName))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub Save()
|
Friend Sub Save()
|
||||||
If bIsModified Then
|
If bIsModified Then
|
||||||
' salvo tutti i parametri su orig
|
' salvo tutti i parametri su orig
|
||||||
@@ -255,15 +171,17 @@ Public Class Material
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SaveParams()
|
Private Sub SaveParams()
|
||||||
|
SaveName()
|
||||||
For Each Cathegory In m_CathegoryList
|
For Each Cathegory In m_CathegoryList
|
||||||
Cathegory.SaveParams()
|
Cathegory.SaveParams()
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub ResetModification()
|
Friend Sub ResetModification()
|
||||||
|
ResetName()
|
||||||
If bIsModified Then
|
If bIsModified Then
|
||||||
' annullo le modifiche di tutti i parametri
|
' annullo le modifiche di tutti i parametri
|
||||||
SaveParams()
|
ResetParams()
|
||||||
' resetto stato di modificata
|
' resetto stato di modificata
|
||||||
UpdateIsModified()
|
UpdateIsModified()
|
||||||
End If
|
End If
|
||||||
@@ -275,12 +193,12 @@ Public Class Material
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub WriteParamsOnDb(nIndex As Integer)
|
Friend Sub WriteParamsOnDb(nIndex As Integer, Optional sFilePath As String = "")
|
||||||
WriteMaterialParam(nIndex, MAT_GUID, m_sGUID)
|
WriteMaterialParam(nIndex, MAT_GUID, m_sGUID, sFilePath)
|
||||||
WriteMaterialParam(nIndex, MAT_NAME, m_sName)
|
WriteMaterialParam(nIndex, MAT_NAME, m_sName, sFilePath)
|
||||||
' EgtWriteStringUtf8toIni(nIndex, MAT_NAME, m_sName)
|
' EgtWriteStringUtf8toIni(nIndex, MAT_NAME, m_sName)
|
||||||
For Each Cathegory In m_CathegoryList
|
For Each Cathegory In m_CathegoryList
|
||||||
Cathegory.WriteParamOnDb(nIndex)
|
Cathegory.WriteParamOnDb(nIndex, sFilePath)
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -323,6 +241,54 @@ Public Class MaterialIndex
|
|||||||
m_sName = sName
|
m_sName = sName
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Function GetSelMaterialData(Param As MaterialParam.Params) As Double
|
||||||
|
Dim sParamKey As String = ""
|
||||||
|
Dim dDefault As Double = 0
|
||||||
|
Select Case Param
|
||||||
|
Case MaterialParam.Params.T1
|
||||||
|
sParamKey = MAT_T1
|
||||||
|
Case MaterialParam.Params.T2
|
||||||
|
sParamKey = MAT_T2
|
||||||
|
Case MaterialParam.Params.T3
|
||||||
|
sParamKey = MAT_T3
|
||||||
|
Case MaterialParam.Params.T4
|
||||||
|
sParamKey = MAT_T4
|
||||||
|
Case MaterialParam.Params.T5
|
||||||
|
sParamKey = MAT_T5
|
||||||
|
Case MaterialParam.Params.K_EXTRUSION
|
||||||
|
sParamKey = MAT_KEXTRUSION
|
||||||
|
dDefault = 100
|
||||||
|
Case MaterialParam.Params.K_LAY_TIME
|
||||||
|
sParamKey = MAT_KLAYERTIME
|
||||||
|
dDefault = 100
|
||||||
|
Case MaterialParam.Params.C1
|
||||||
|
sParamKey = MAT_C1
|
||||||
|
Case MaterialParam.Params.C2
|
||||||
|
sParamKey = MAT_C2
|
||||||
|
Case MaterialParam.Params.DENSITY
|
||||||
|
sParamKey = MAT_DENSITY
|
||||||
|
Case MaterialParam.Params.AMAX
|
||||||
|
sParamKey = MAT_AMAX
|
||||||
|
Case MaterialParam.Params.ATRG
|
||||||
|
sParamKey = MAT_ATRG
|
||||||
|
Case MaterialParam.Params.AMIN
|
||||||
|
sParamKey = MAT_AMIN
|
||||||
|
Case MaterialParam.Params.BMAX
|
||||||
|
sParamKey = MAT_BMAX
|
||||||
|
Case MaterialParam.Params.BTRG
|
||||||
|
sParamKey = MAT_BTRG
|
||||||
|
Case MaterialParam.Params.BMIN
|
||||||
|
sParamKey = MAT_BMIN
|
||||||
|
Case MaterialParam.Params.KW
|
||||||
|
sParamKey = MAT_KW
|
||||||
|
Case MaterialParam.Params.KZ
|
||||||
|
sParamKey = MAT_KZ
|
||||||
|
Case MaterialParam.Params.KN
|
||||||
|
sParamKey = MAT_KN
|
||||||
|
End Select
|
||||||
|
Return ReadMaterialParamDouble(m_nIndex, sParamKey, dDefault)
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class MaterialCathegory
|
Public Class MaterialCathegory
|
||||||
@@ -377,7 +343,8 @@ Public Class MaterialCathegory
|
|||||||
Select Case m_Type
|
Select Case m_Type
|
||||||
Case Cathegories.GENERAL
|
Case Cathegories.GENERAL
|
||||||
m_sName = "General"
|
m_sName = "General"
|
||||||
m_MaterialParamList = New List(Of MaterialParam)({New NumericMaterialParam(MaterialParam.Params.K, nIndex),
|
m_MaterialParamList = New List(Of MaterialParam)({New NumericMaterialParam(MaterialParam.Params.K_EXTRUSION, nIndex),
|
||||||
|
New NumericMaterialParam(MaterialParam.Params.K_LAY_TIME, nIndex),
|
||||||
New NumericMaterialParam(MaterialParam.Params.DENSITY, nIndex),
|
New NumericMaterialParam(MaterialParam.Params.DENSITY, nIndex),
|
||||||
New StringMaterialParam(MaterialParam.Params.ORIG, nIndex)})
|
New StringMaterialParam(MaterialParam.Params.ORIG, nIndex)})
|
||||||
m_Cathegory_Visibility = Visibility.Visible
|
m_Cathegory_Visibility = Visibility.Visible
|
||||||
@@ -419,9 +386,9 @@ Public Class MaterialCathegory
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub WriteParamOnDb(nIndex As Integer)
|
Friend Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
|
||||||
For Each Param In m_MaterialParamList
|
For Each Param In m_MaterialParamList
|
||||||
Param.WriteParamOnDb(nIndex)
|
Param.WriteParamOnDb(nIndex, sFilePath)
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -437,20 +404,21 @@ Public MustInherit Class MaterialParam
|
|||||||
T3 = 5
|
T3 = 5
|
||||||
T4 = 6
|
T4 = 6
|
||||||
T5 = 7
|
T5 = 7
|
||||||
K = 8
|
K_EXTRUSION = 8
|
||||||
C1 = 9
|
K_LAY_TIME = 9
|
||||||
C2 = 10
|
C1 = 10
|
||||||
DENSITY = 11
|
C2 = 11
|
||||||
AMAX = 12
|
DENSITY = 12
|
||||||
ATRG = 13
|
AMAX = 13
|
||||||
AMIN = 14
|
ATRG = 14
|
||||||
BMAX = 15
|
AMIN = 15
|
||||||
BTRG = 16
|
BMAX = 16
|
||||||
BMIN = 17
|
BTRG = 17
|
||||||
KW = 18
|
BMIN = 18
|
||||||
KZ = 19
|
KW = 19
|
||||||
KN = 20
|
KZ = 20
|
||||||
ORIG = 21
|
KN = 21
|
||||||
|
ORIG = 22
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Private m_Type As Params
|
Private m_Type As Params
|
||||||
@@ -482,8 +450,10 @@ Public MustInherit Class MaterialParam
|
|||||||
m_sName = "Temperature 4"
|
m_sName = "Temperature 4"
|
||||||
Case Params.T5
|
Case Params.T5
|
||||||
m_sName = "Temperature 5"
|
m_sName = "Temperature 5"
|
||||||
Case Params.K
|
Case Params.K_EXTRUSION
|
||||||
m_sName = "Constant"
|
m_sName = "Flow Multiplier [%]"
|
||||||
|
Case Params.K_LAY_TIME
|
||||||
|
m_sName = "Layer Time Multiplier [%]"
|
||||||
Case Params.C1
|
Case Params.C1
|
||||||
m_sName = "C1"
|
m_sName = "C1"
|
||||||
Case Params.C2
|
Case Params.C2
|
||||||
@@ -514,7 +484,7 @@ Public MustInherit Class MaterialParam
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Friend MustOverride Sub WriteParamOnDb(nIndex As Integer)
|
Friend MustOverride Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
|
||||||
Friend MustOverride Sub SaveParam()
|
Friend MustOverride Sub SaveParam()
|
||||||
Friend MustOverride Sub ResetParam()
|
Friend MustOverride Sub ResetParam()
|
||||||
|
|
||||||
@@ -571,8 +541,11 @@ Public Class NumericMaterialParam
|
|||||||
Case Params.T5
|
Case Params.T5
|
||||||
m_dValue = ReadMaterialParamDouble(nIndex, MAT_T5, 0)
|
m_dValue = ReadMaterialParamDouble(nIndex, MAT_T5, 0)
|
||||||
m_bIsLen = False
|
m_bIsLen = False
|
||||||
Case Params.K
|
Case Params.K_EXTRUSION
|
||||||
m_dValue = ReadMaterialParamDouble(nIndex, MAT_K, 0)
|
m_dValue = ReadMaterialParamDouble(nIndex, MAT_KEXTRUSION, 100)
|
||||||
|
m_bIsLen = False
|
||||||
|
Case Params.K_LAY_TIME
|
||||||
|
m_dValue = ReadMaterialParamDouble(nIndex, MAT_KLAYERTIME, 100)
|
||||||
m_bIsLen = False
|
m_bIsLen = False
|
||||||
Case Params.C1
|
Case Params.C1
|
||||||
m_dValue = ReadMaterialParamDouble(nIndex, MAT_C1, 0)
|
m_dValue = ReadMaterialParamDouble(nIndex, MAT_C1, 0)
|
||||||
@@ -614,7 +587,7 @@ Public Class NumericMaterialParam
|
|||||||
m_dOrigValue = m_dValue
|
m_dOrigValue = m_dValue
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
|
Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
|
||||||
Dim sWriteValue As String = ""
|
Dim sWriteValue As String = ""
|
||||||
If m_bIsLen Then
|
If m_bIsLen Then
|
||||||
sWriteValue = LenToString(m_dValue, 5)
|
sWriteValue = LenToString(m_dValue, 5)
|
||||||
@@ -623,41 +596,43 @@ Public Class NumericMaterialParam
|
|||||||
End If
|
End If
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.T1
|
Case Params.T1
|
||||||
WriteMaterialParam(nIndex, MAT_T1, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_T1, sWriteValue, sFilePath)
|
||||||
Case Params.T2
|
Case Params.T2
|
||||||
WriteMaterialParam(nIndex, MAT_T2, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_T2, sWriteValue, sFilePath)
|
||||||
Case Params.T3
|
Case Params.T3
|
||||||
WriteMaterialParam(nIndex, MAT_T3, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_T3, sWriteValue, sFilePath)
|
||||||
Case Params.T4
|
Case Params.T4
|
||||||
WriteMaterialParam(nIndex, MAT_T4, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_T4, sWriteValue, sFilePath)
|
||||||
Case Params.T5
|
Case Params.T5
|
||||||
WriteMaterialParam(nIndex, MAT_T5, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_T5, sWriteValue, sFilePath)
|
||||||
Case Params.K
|
Case Params.K_EXTRUSION
|
||||||
WriteMaterialParam(nIndex, MAT_K, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_KEXTRUSION, sWriteValue, sFilePath)
|
||||||
|
Case Params.K_LAY_TIME
|
||||||
|
WriteMaterialParam(nIndex, MAT_KLAYERTIME, sWriteValue, sFilePath)
|
||||||
Case Params.C1
|
Case Params.C1
|
||||||
WriteMaterialParam(nIndex, MAT_C1, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_C1, sWriteValue, sFilePath)
|
||||||
Case Params.C2
|
Case Params.C2
|
||||||
WriteMaterialParam(nIndex, MAT_C2, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_C2, sWriteValue, sFilePath)
|
||||||
Case Params.DENSITY
|
Case Params.DENSITY
|
||||||
WriteMaterialParam(nIndex, MAT_DENSITY, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_DENSITY, sWriteValue, sFilePath)
|
||||||
Case Params.AMAX
|
Case Params.AMAX
|
||||||
WriteMaterialParam(nIndex, MAT_AMAX, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_AMAX, sWriteValue, sFilePath)
|
||||||
Case Params.ATRG
|
Case Params.ATRG
|
||||||
WriteMaterialParam(nIndex, MAT_ATRG, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_ATRG, sWriteValue, sFilePath)
|
||||||
Case Params.AMIN
|
Case Params.AMIN
|
||||||
WriteMaterialParam(nIndex, MAT_AMIN, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_AMIN, sWriteValue, sFilePath)
|
||||||
Case Params.BMAX
|
Case Params.BMAX
|
||||||
WriteMaterialParam(nIndex, MAT_BMAX, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_BMAX, sWriteValue, sFilePath)
|
||||||
Case Params.BTRG
|
Case Params.BTRG
|
||||||
WriteMaterialParam(nIndex, MAT_BTRG, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_BTRG, sWriteValue, sFilePath)
|
||||||
Case Params.BMIN
|
Case Params.BMIN
|
||||||
WriteMaterialParam(nIndex, MAT_BMIN, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_BMIN, sWriteValue, sFilePath)
|
||||||
Case Params.KW
|
Case Params.KW
|
||||||
WriteMaterialParam(nIndex, MAT_KW, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_KW, sWriteValue, sFilePath)
|
||||||
Case Params.KZ
|
Case Params.KZ
|
||||||
WriteMaterialParam(nIndex, MAT_KZ, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_KZ, sWriteValue, sFilePath)
|
||||||
Case Params.KN
|
Case Params.KN
|
||||||
WriteMaterialParam(nIndex, MAT_KN, sWriteValue)
|
WriteMaterialParam(nIndex, MAT_KN, sWriteValue, sFilePath)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -715,10 +690,10 @@ Public Class StringMaterialParam
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_bIsReadOnly As Boolean = True
|
Private m_OrigButton_Visibility As Visibility = Visibility.Collapsed
|
||||||
Public ReadOnly Property bIsReadOnly As Boolean
|
Public ReadOnly Property OrigButton_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
Return m_bIsReadOnly
|
Return m_OrigButton_Visibility
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -729,15 +704,18 @@ Public Class StringMaterialParam
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdOriginal As ICommand
|
||||||
|
|
||||||
Sub New(Type As Params, nIndex As Integer)
|
Sub New(Type As Params, nIndex As Integer)
|
||||||
MyBase.New(Type)
|
MyBase.New(Type)
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.ORIG
|
Case Params.ORIG
|
||||||
Dim sOrigGUID As String = ""
|
Dim sOrigGUID As String = ""
|
||||||
ReadMaterialParamString(nIndex, MAT_ORIG, "", sOrigGUID)
|
ReadMaterialParamString(nIndex, MAT_ORIG, "", sOrigGUID)
|
||||||
If sOrigGUID = "***" Then
|
If sOrigGUID = ORIG_MATERIAL Then
|
||||||
m_sGUID = sOrigGUID
|
m_sGUID = ORIG_MATERIAL
|
||||||
m_sValue = sOrigGUID
|
m_sValue = ORIG_MATERIAL
|
||||||
' se livello alto, lo visualizzo comunque
|
' se livello alto, lo visualizzo comunque
|
||||||
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
|
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
|
||||||
m_String_Visibility = Visibility.Visible
|
m_String_Visibility = Visibility.Visible
|
||||||
@@ -757,15 +735,15 @@ Public Class StringMaterialParam
|
|||||||
End Select
|
End Select
|
||||||
' verifico chiave per assegnare readonly
|
' verifico chiave per assegnare readonly
|
||||||
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
|
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
|
||||||
m_bIsReadOnly = False
|
m_OrigButton_Visibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
m_sOrigValue = m_sValue
|
m_sOrigValue = m_sValue
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
|
Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.ORIG
|
Case Params.ORIG
|
||||||
WriteMaterialParam(nIndex, MAT_ORIG, m_sGUID)
|
WriteMaterialParam(nIndex, MAT_ORIG, m_sGUID, sFilePath)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -777,6 +755,31 @@ Public Class StringMaterialParam
|
|||||||
m_sValue = m_sOrigValue
|
m_sValue = m_sOrigValue
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Original"
|
||||||
|
|
||||||
|
Public ReadOnly Property Original_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOriginal Is Nothing Then
|
||||||
|
m_cmdOriginal = New Command(AddressOf Original)
|
||||||
|
End If
|
||||||
|
Return m_cmdOriginal
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Original()
|
||||||
|
If MessageBox.Show("Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||||
|
m_sGUID = ORIG_MATERIAL
|
||||||
|
m_sValue = ORIG_MATERIAL
|
||||||
|
NotifyPropertyChanged(NameOf(sValue))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Original
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class ComboMaterialParam
|
Public Class ComboMaterialParam
|
||||||
@@ -824,10 +827,10 @@ Public Class ComboMaterialParam
|
|||||||
m_OrigSelValue = m_SelValue
|
m_OrigSelValue = m_SelValue
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
|
Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
|
||||||
Select Case Type
|
Select Case Type
|
||||||
'Case Params.STRANDORDER
|
'Case Params.STRANDORDER
|
||||||
' WriteMaterialParam(nIndex, MAC_STRANDORDER, m_SelValue.Id)
|
' WriteMaterialParam(nIndex, MAC_STRANDORDER, m_SelValue.Id, sFilePath)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -871,16 +874,12 @@ Public Class CheckMaterialParam
|
|||||||
Sub New(Type As Params, nIndex As Integer)
|
Sub New(Type As Params, nIndex As Integer)
|
||||||
MyBase.New(Type)
|
MyBase.New(Type)
|
||||||
Select Case Type
|
Select Case Type
|
||||||
'Case Params.SLICING45
|
|
||||||
' m_bValue = ReadMaterialParamDouble(nIndex, MAC_SLICING45, 0)
|
|
||||||
End Select
|
End Select
|
||||||
m_bOrigValue = m_bValue
|
m_bOrigValue = m_bValue
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
|
Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
|
||||||
Select Case Type
|
Select Case Type
|
||||||
'Case Params.SLICING45
|
|
||||||
' WriteMaterialParam(nIndex, MAC_SLICING45, If(m_bValue, 1, 0))
|
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -1,54 +1,118 @@
|
|||||||
<UserControl x:Class="MaterialDbV"
|
<Grid x:Class="MaterialDbV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
xmlns:PrintApp="clr-namespace:Icarus">
|
xmlns:PrintApp="clr-namespace:Icarus"
|
||||||
<Border VerticalAlignment="Center"
|
Width="310"
|
||||||
Style="{StaticResource RightPanel_Border}">
|
VerticalAlignment="Center">
|
||||||
<Grid>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Margin="0,0,0,2.5"
|
||||||
|
Style="{StaticResource Title_Border}">
|
||||||
|
<TextBlock Text="MATERIAL DATABASE"
|
||||||
|
Style="{StaticResource Title_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Row="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="0,2.5,0,0"
|
||||||
|
Style="{StaticResource BottomGrayRow_Border}">
|
||||||
|
<Grid Margin="2.5,2.5,2.5,0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<UniformGrid Rows="1">
|
<Grid HorizontalAlignment="Center"
|
||||||
|
Margin="0,2.5,0,2.5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<Button Content="Copy"
|
<Button Content="Copy"
|
||||||
Command="{Binding Copy_Command}"
|
Command="{Binding Copy_Command}"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
IsEnabled="{Binding IsEnabled}"
|
||||||
<Button Content="Save"
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_Button}"/>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Content="Save"
|
||||||
Command="{Binding Save_Command}"
|
Command="{Binding Save_Command}"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
IsEnabled="{Binding IsEnabled}"
|
||||||
<Button Content="Delete"
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_Button}"/>
|
||||||
|
<Button Grid.Column="2" Content="Delete"
|
||||||
Command="{Binding Delete_Command}"
|
Command="{Binding Delete_Command}"
|
||||||
IsEnabled="{Binding Delete_IsEnabled}"
|
IsEnabled="{Binding Delete_IsEnabled}"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Margin="2.5,0,2.5,0"
|
||||||
</UniformGrid>
|
Style="{StaticResource RightPanel_Button}"/>
|
||||||
<ComboBox Grid.Row="1"
|
<Button Grid.Column="3"
|
||||||
Name="MaterialCombo"
|
Command="{Binding Import_Command}"
|
||||||
ItemsSource="{Binding MaterialList}"
|
ToolTip="{Binding Import_ToolTip}"
|
||||||
SelectedItem="{Binding SelMaterial}"
|
IsEnabled="{Binding ImpExp_IsEnabled}"
|
||||||
DisplayMemberPath="ghName"/>
|
Margin="2.5,0,2.5,0"
|
||||||
<Grid Grid.Row="2"
|
Style="{StaticResource ToolBar_Button}">
|
||||||
Visibility="{Binding Name_Visibility}">
|
<Image Source="/Resources/MaterialDB/MaterialImport.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="4"
|
||||||
|
Command="{Binding Export_Command}"
|
||||||
|
ToolTip="{Binding Export_ToolTip}"
|
||||||
|
IsEnabled="{Binding ImpExp_IsEnabled}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/MaterialDB/MaterialExport.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="1"
|
||||||
|
Margin="0,2.5,0,2.5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding Name_Msg}"/>
|
<ComboBox Name="MaterialCombo"
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
ItemsSource="{Binding MaterialList}"
|
||||||
Text="{Binding SelectedItem.sName, ElementName=MaterialCombo, UpdateSourceTrigger=Explicit}"/>
|
SelectedItem="{Binding SelMaterial}"
|
||||||
|
DisplayMemberPath="ghName"
|
||||||
|
Visibility="{Binding Combo_Visibility}"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox2 Text="{Binding SelectedItem.sName, ElementName=MaterialCombo, UpdateSourceTrigger=Explicit}"
|
||||||
|
ExplicitUpdateSource="EnterKeyPressOrLostFocus"
|
||||||
|
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
||||||
|
Visibility="{Binding Name_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource OptionTextBox2}"/>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Command="{Binding EditName_Command}"
|
||||||
|
ToolTip="{Binding EditName_ToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/MaterialDB/Edit.png"/>
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
<ScrollViewer Grid.Row="3"
|
<ScrollViewer Grid.Row="2"
|
||||||
|
IsEnabled="{Binding IsEnabled}"
|
||||||
VerticalScrollBarVisibility="Auto"
|
VerticalScrollBarVisibility="Auto"
|
||||||
HorizontalScrollBarVisibility="Disabled">
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
<ItemsControl Grid.Row="1"
|
Margin="1,0,0,2.5"
|
||||||
ItemsSource="{Binding SelectedItem.CathegoryList, ElementName=MaterialCombo}">
|
Padding="0"
|
||||||
|
BorderThickness="0"
|
||||||
|
Style="{StaticResource RightPanel_ScrollViewer}">
|
||||||
|
<ItemsControl ItemsSource="{Binding SelectedItem.CathegoryList, ElementName=MaterialCombo}"
|
||||||
|
BorderThickness="0"
|
||||||
|
Margin="0"
|
||||||
|
Padding="0">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel Orientation="Vertical"/>
|
<StackPanel Orientation="Vertical"
|
||||||
|
Margin="0"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
@@ -57,11 +121,14 @@
|
|||||||
IsExpanded="{Binding Cathegory_IsExpanded}"
|
IsExpanded="{Binding Cathegory_IsExpanded}"
|
||||||
VerticalContentAlignment="Top"
|
VerticalContentAlignment="Top"
|
||||||
Visibility="{Binding Cathegory_Visibility}">
|
Visibility="{Binding Cathegory_Visibility}">
|
||||||
<ItemsControl ItemsSource="{Binding MaterialParamList}">
|
<ItemsControl ItemsSource="{Binding MaterialParamList}"
|
||||||
|
BorderThickness="0"
|
||||||
|
Margin="0"
|
||||||
|
Padding="0">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<UniformGrid Columns="1"
|
<StackPanel Orientation="Vertical"
|
||||||
HorizontalAlignment="Stretch"/>
|
Margin="0"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.ItemContainerStyle>
|
<ItemsControl.ItemContainerStyle>
|
||||||
@@ -71,92 +138,77 @@
|
|||||||
</ItemsControl.ItemContainerStyle>
|
</ItemsControl.ItemContainerStyle>
|
||||||
<ItemsControl.Resources>
|
<ItemsControl.Resources>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:NumericMaterialParam}">
|
<DataTemplate DataType="{x:Type PrintApp:NumericMaterialParam}">
|
||||||
<Grid>
|
<Grid Margin="0,1,2.5,1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
<TextBox Grid.Column="1"
|
<TextBox Grid.Column="1"
|
||||||
Text="{Binding dValue}"/>
|
Text="{Binding dValue}"
|
||||||
<!--<Button Grid.Column="2"
|
Margin="2.5,0,0,0"
|
||||||
Content="R"
|
Style="{StaticResource ParameterList_TextBox}"/>
|
||||||
Command="{Binding ResetParam_Command}"
|
|
||||||
CommandParameter="dCurrStrandH"
|
|
||||||
IsEnabled="{Binding bCurrStrandH_IsModified}"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
HorizontalContentAlignment="Center"
|
|
||||||
Margin="5,0,0,0"
|
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>-->
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:StringMaterialParam}">
|
<DataTemplate DataType="{x:Type PrintApp:StringMaterialParam}">
|
||||||
<Grid Visibility="{Binding String_Visibility}">
|
<Grid Visibility="{Binding String_Visibility}"
|
||||||
|
Margin="0,1,2.5,1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
<TextBox Grid.Column="1"
|
<TextBox Grid.Column="1"
|
||||||
Text="{Binding sValue}"
|
Text="{Binding sValue}"
|
||||||
IsReadOnly="{Binding bIsReadOnly}"/>
|
IsReadOnly="True"/>
|
||||||
<!--<Button Grid.Column="2"
|
<Button Grid.Column="2"
|
||||||
Content="R"
|
Content="O"
|
||||||
Command="{Binding ResetParam_Command}"
|
Command="{Binding Original_Command}"
|
||||||
CommandParameter="dCurrStrandH"
|
|
||||||
IsEnabled="{Binding bCurrStrandH_IsModified}"
|
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>-->
|
Visibility="{Binding OrigButton_Visibility}"
|
||||||
|
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:ComboMaterialParam}">
|
<DataTemplate DataType="{x:Type PrintApp:ComboMaterialParam}">
|
||||||
<Grid>
|
<Grid Margin="0,1,2.5,1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<!--<ColumnDefinition Width="Auto"/>-->
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
<ComboBox Grid.Column="1"
|
<ComboBox Grid.Column="1"
|
||||||
ItemsSource="{Binding ValueList}"
|
ItemsSource="{Binding ValueList}"
|
||||||
SelectedItem="{Binding SelValue}"
|
SelectedItem="{Binding SelValue}"
|
||||||
HorizontalAlignment="Stretch"/>
|
HorizontalAlignment="Stretch"
|
||||||
<!--<Button Grid.Column="1"
|
Margin="2.5,0,0,0"
|
||||||
Content="R"
|
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||||
Command="{Binding ResetParam_Command}"
|
|
||||||
CommandParameter="dCurrStrandH"
|
|
||||||
IsEnabled="{Binding bCurrStrandH_IsModified}"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
HorizontalContentAlignment="Center"
|
|
||||||
Margin="5,0,0,0"
|
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>-->
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type PrintApp:CheckMaterialParam}">
|
<DataTemplate DataType="{x:Type PrintApp:CheckMaterialParam}">
|
||||||
<Grid>
|
<Grid Height="22"
|
||||||
|
Margin="0,1,2.5,1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<!--<ColumnDefinition Width="Auto"/>-->
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding sName}"/>
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||||
<CheckBox Grid.Column="1"
|
<CheckBox Grid.Column="1"
|
||||||
IsChecked="{Binding bValue}"
|
IsChecked="{Binding bValue}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"
|
||||||
<!--<Button Grid.Column="1"
|
Margin="2.5,0,0,0"/>
|
||||||
Content="R"
|
|
||||||
Command="{Binding ResetParam_Command}"
|
|
||||||
CommandParameter="dCurrStrandH"
|
|
||||||
IsEnabled="{Binding bCurrStrandH_IsModified}"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
HorizontalContentAlignment="Center"
|
|
||||||
Margin="5,0,0,0"
|
|
||||||
Style="{StaticResource ToolBar_SmallButton}"/>-->
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.Resources>
|
</ItemsControl.Resources>
|
||||||
@@ -166,11 +218,14 @@
|
|||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
<UniformGrid Grid.Row="4" Rows="1">
|
<Button Grid.Row="3"
|
||||||
<Button Content="Ok"
|
Command="{Binding Ok_Command}"
|
||||||
Command="{Binding Ok_Command}"
|
IsEnabled="{Binding IsEnabled}"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Margin="0,2.5,0,0"
|
||||||
</UniformGrid>
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</Grid>
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ Public Class MaterialDbVM
|
|||||||
m_SelMaterial.CathegoryList(Index).Cathegory_IsExpanded = IsExpandedList(Index)
|
m_SelMaterial.CathegoryList(Index).Cathegory_IsExpanded = IsExpandedList(Index)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
' verifico abilitazione delete
|
||||||
|
SetDeleteIsEnabled(Not SelMaterialIsOriginal())
|
||||||
|
NotifyPropertyChanged(NameOf(Delete_IsEnabled))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -57,10 +60,13 @@ Public Class MaterialDbVM
|
|||||||
Return m_Name_Visibility
|
Return m_Name_Visibility
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetNameVisibility(bValue As Boolean)
|
|
||||||
m_Name_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
Private m_Combo_Visibility As Visibility = Visibility.Visible
|
||||||
NotifyPropertyChanged(NameOf(Name_Visibility))
|
Public ReadOnly Property Combo_Visibility As Visibility
|
||||||
End Sub
|
Get
|
||||||
|
Return m_Combo_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
' variabile che indica se una qualunque lavorazione e' stata modificata
|
' variabile che indica se una qualunque lavorazione e' stata modificata
|
||||||
Private m_bIsModified As Boolean
|
Private m_bIsModified As Boolean
|
||||||
@@ -73,11 +79,85 @@ Public Class MaterialDbVM
|
|||||||
m_bIsModified = value
|
m_bIsModified = value
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private m_IsEnabled As Boolean = True
|
||||||
|
Public ReadOnly Property IsEnabled As Boolean
|
||||||
|
Get
|
||||||
|
Return m_IsEnabled
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetIsEnabled(value As Boolean)
|
||||||
|
m_IsEnabled = value
|
||||||
|
NotifyPropertyChanged(NameOf(IsEnabled))
|
||||||
|
NotifyPropertyChanged(NameOf(Delete_IsEnabled))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_Delete_IsEnabled As Boolean = True
|
||||||
|
Public ReadOnly Property Delete_IsEnabled As Boolean
|
||||||
|
Get
|
||||||
|
Return m_IsEnabled AndAlso m_Delete_IsEnabled
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetDeleteIsEnabled(value As Boolean)
|
||||||
|
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
|
||||||
|
m_Delete_IsEnabled = True
|
||||||
|
Else
|
||||||
|
m_Delete_IsEnabled = value
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(Delete_IsEnabled))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_UserShouldEditValueNow As Boolean = False
|
||||||
|
Public Property UserShouldEditValueNow As Boolean
|
||||||
|
Get
|
||||||
|
Return m_UserShouldEditValueNow
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_UserShouldEditValueNow = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetUserShouldEditValueNow()
|
||||||
|
m_UserShouldEditValueNow = True
|
||||||
|
NotifyPropertyChanged(NameOf(UserShouldEditValueNow))
|
||||||
|
m_UserShouldEditValueNow = False
|
||||||
|
NotifyPropertyChanged(NameOf(UserShouldEditValueNow))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public ReadOnly Property ImpExp_IsEnabled As Boolean
|
||||||
|
Get
|
||||||
|
Return m_IsEnabled AndAlso (IsNothing(m_SelMaterial) OrElse Not m_SelMaterial.bIsModified)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Tooltip"
|
||||||
|
|
||||||
|
Public ReadOnly Property Import_ToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Import"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Export_ToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Export"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property EditName_ToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Edit Name"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Tooltip
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdOk As ICommand
|
Private m_cmdOk As ICommand
|
||||||
Private m_cmdCopy As ICommand
|
Private m_cmdCopy As ICommand
|
||||||
Private m_cmdSave As ICommand
|
Private m_cmdSave As ICommand
|
||||||
Private m_cmdDelete As ICommand
|
Private m_cmdDelete As ICommand
|
||||||
|
Private m_cmdEditName As ICommand
|
||||||
|
Private m_cmdImport As ICommand
|
||||||
|
Private m_cmdExport As ICommand
|
||||||
|
|
||||||
#End Region ' FIELDS & PROPERTIES
|
#End Region ' FIELDS & PROPERTIES
|
||||||
|
|
||||||
@@ -104,9 +184,40 @@ Public Class MaterialDbVM
|
|||||||
Dim sCurrMaterial As String = ""
|
Dim sCurrMaterial As String = ""
|
||||||
GetMainPrivateProfileString(S_PRINTING3D, K_CURRMATERIAL, "", sCurrMaterial)
|
GetMainPrivateProfileString(S_PRINTING3D, K_CURRMATERIAL, "", sCurrMaterial)
|
||||||
m_SelMaterial = MaterialList.FirstOrDefault(Function(x) x.sGUID = sCurrMaterial)
|
m_SelMaterial = MaterialList.FirstOrDefault(Function(x) x.sGUID = sCurrMaterial)
|
||||||
|
If IsNothing(m_SelMaterial) AndAlso m_MaterialList.Count > 0 Then
|
||||||
|
m_SelMaterial = m_MaterialList(0)
|
||||||
|
End If
|
||||||
NotifyPropertyChanged(NameOf(SelMaterial))
|
NotifyPropertyChanged(NameOf(SelMaterial))
|
||||||
|
' verifico abilitazione delete
|
||||||
|
If Not IsNothing(m_SelMaterial) Then
|
||||||
|
SetDeleteIsEnabled(Not SelMaterialIsOriginal())
|
||||||
|
NotifyPropertyChanged(NameOf(Delete_IsEnabled))
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub SetNameVisibility(bValue As Boolean)
|
||||||
|
m_Name_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
m_Combo_Visibility = If(Not bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(Name_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(Combo_Visibility))
|
||||||
|
If bValue Then SetUserShouldEditValueNow()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function SelMaterialIsOriginal() As Boolean
|
||||||
|
If IsNothing(m_SelMaterial) Then Return False
|
||||||
|
' verifico abilitazione delete
|
||||||
|
Dim General As MaterialCathegory = m_SelMaterial.CathegoryList.FirstOrDefault(Function(x) x.Type = MaterialCathegory.Cathegories.GENERAL)
|
||||||
|
If Not IsNothing(General) Then
|
||||||
|
Dim Original As MaterialParam = General.MaterialParamList.FirstOrDefault(Function(x) x.Type = MaterialParam.Params.ORIG)
|
||||||
|
If Not IsNothing(Original) Then
|
||||||
|
If DirectCast(Original, StringMaterialParam).sValue = ORIG_MATERIAL Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
@@ -135,7 +246,7 @@ Public Class MaterialDbVM
|
|||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
If m_bIsModified Then
|
If m_bIsModified Then
|
||||||
Dim sBakMatIniFilePath As String = Path.ChangeExtension(CurrentMachine.sMaterialsFilePath, ".bak")
|
Dim sBakMatIniFilePath As String = Path.ChangeExtension(CurrentMachine.sMaterialFilePath, ".bak")
|
||||||
If File.Exists(sBakMatIniFilePath) Then
|
If File.Exists(sBakMatIniFilePath) Then
|
||||||
Try
|
Try
|
||||||
' cambio estensione in bak a file Db vecchio
|
' cambio estensione in bak a file Db vecchio
|
||||||
@@ -143,24 +254,24 @@ Public Class MaterialDbVM
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
If File.Exists(CurrentMachine.sMaterialsFilePath) Then
|
If File.Exists(CurrentMachine.sMaterialFilePath) Then
|
||||||
Try
|
Try
|
||||||
' cambio estensione in bak a file Db vecchio
|
' cambio estensione in bak a file Db vecchio
|
||||||
File.Move(CurrentMachine.sMaterialsFilePath, sBakMatIniFilePath)
|
File.Move(CurrentMachine.sMaterialFilePath, sBakMatIniFilePath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
' se ancora esiste lo elimino
|
' se ancora esiste lo elimino
|
||||||
If File.Exists(CurrentMachine.sMaterialsFilePath) Then
|
If File.Exists(CurrentMachine.sMaterialFilePath) Then
|
||||||
Try
|
Try
|
||||||
File.Delete(CurrentMachine.sMaterialsFilePath)
|
File.Delete(CurrentMachine.sMaterialFilePath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
' creo nuovo file
|
' creo nuovo file
|
||||||
If Not File.Exists(CurrentMachine.sMaterialsFilePath) Then
|
If Not File.Exists(CurrentMachine.sMaterialFilePath) Then
|
||||||
Try
|
Try
|
||||||
File.WriteAllLines(CurrentMachine.sMaterialsFilePath, {"; Commento per evitare BOM con UTF-8"})
|
File.WriteAllLines(CurrentMachine.sMaterialFilePath, {"; Commento per evitare BOM con UTF-8"})
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
@@ -181,6 +292,8 @@ Public Class MaterialDbVM
|
|||||||
Map.refTopPanelVM.SelMaterial = Nothing
|
Map.refTopPanelVM.SelMaterial = Nothing
|
||||||
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.SelMaterial))
|
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.SelMaterial))
|
||||||
End If
|
End If
|
||||||
|
' ricarico lavorazioni per aggiorno liste materiali all'interno
|
||||||
|
Map.refMachiningDbVM.Init()
|
||||||
End If
|
End If
|
||||||
' ripristino modalita' standard
|
' ripristino modalita' standard
|
||||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||||
@@ -248,10 +361,28 @@ Public Class MaterialDbVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub Delete()
|
Public Sub Delete()
|
||||||
|
Dim sCheckMessage As String = "Are you sure you want to delete selected material?"
|
||||||
|
' se materiale originale, esco
|
||||||
|
If SelMaterialIsOriginal() Then
|
||||||
|
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
|
||||||
|
If MessageBox.Show("Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
sCheckMessage = "Trying to delete an Original Material! Are you ABSOLUTELY sure you want to delete it?"
|
||||||
|
Else
|
||||||
|
MessageBox.Show("Original material impossible to delete!")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
End If
|
||||||
' chiedo conferma
|
' chiedo conferma
|
||||||
Select Case MessageBox.Show("Sei sicuro di voler cancellare la lavorazione selezionata?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
Select Case MessageBox.Show(sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
|
||||||
Case MessageBoxResult.Yes
|
Case MessageBoxResult.Yes
|
||||||
m_MaterialList.Remove(m_SelMaterial)
|
m_MaterialList.Remove(m_SelMaterial)
|
||||||
|
SetIsModified(True)
|
||||||
|
If m_MaterialList.Count > 0 Then
|
||||||
|
SelMaterial = m_MaterialList(0)
|
||||||
|
NotifyPropertyChanged(NameOf(SelMaterial))
|
||||||
|
End If
|
||||||
' segno Db come modificato
|
' segno Db come modificato
|
||||||
Map.refMaterialDbVM.SetIsModified(True)
|
Map.refMaterialDbVM.SetIsModified(True)
|
||||||
Case MessageBoxResult.No
|
Case MessageBoxResult.No
|
||||||
@@ -261,6 +392,78 @@ Public Class MaterialDbVM
|
|||||||
|
|
||||||
#End Region ' Delete
|
#End Region ' Delete
|
||||||
|
|
||||||
|
#Region "EditName"
|
||||||
|
|
||||||
|
Public ReadOnly Property EditName_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdEditName Is Nothing Then
|
||||||
|
m_cmdEditName = New Command(AddressOf EditName)
|
||||||
|
End If
|
||||||
|
Return m_cmdEditName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub EditName()
|
||||||
|
If IsNothing(m_SelMaterial) Then Return
|
||||||
|
SetNameVisibility(True)
|
||||||
|
SetIsEnabled(False)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' EditName
|
||||||
|
|
||||||
|
#Region "Import"
|
||||||
|
|
||||||
|
Public ReadOnly Property Import_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdImport Is Nothing Then
|
||||||
|
m_cmdImport = New Command(AddressOf Import)
|
||||||
|
End If
|
||||||
|
Return m_cmdImport
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Import()
|
||||||
|
' chiedo il nome del file .data da aprire
|
||||||
|
Dim OpenFileDlg As New System.Windows.Forms.OpenFileDialog() With {.Title = EgtMsg(31451) & " " & EgtMsg(31452),
|
||||||
|
.Filter = "Material file data (*" & ImportExportMachiningPanelVM.MaterialDataExtension & ")|*" & ImportExportMachiningPanelVM.MaterialDataExtension &
|
||||||
|
"|Original Material file data (*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension & ")|*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension &
|
||||||
|
"|All Material file data (*" & ImportExportMachiningPanelVM.MaterialDataExtension & "," & ImportExportMachiningPanelVM.OriginalMaterialDataExtension & ")|*" &
|
||||||
|
ImportExportMachiningPanelVM.MaterialDataExtension & ";*" & ImportExportMachiningPanelVM.OriginalMaterialDataExtension,
|
||||||
|
.FilterIndex = 3,
|
||||||
|
.FileName = String.Empty}
|
||||||
|
If OpenFileDlg.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then Return
|
||||||
|
Dim ImportWindowVM As New ImportExportMachiningPanelVM(ImportExportMachiningPanelVM.WindowTypeEnum.MATERIAL, ImportExportMachiningPanelVM.WindowModeEnum.IMPORT, OpenFileDlg.FileName)
|
||||||
|
If ImportWindowVM.WindowMode <> ImportExportMachiningPanelVM.WindowModeEnum.IMPORT_ORIG Then
|
||||||
|
Dim ImportWindowV As New ImportExportMachiningPanelV(Application.Current.MainWindow, ImportWindowVM)
|
||||||
|
ImportWindowV.ShowDialog()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Import
|
||||||
|
|
||||||
|
#Region "Export"
|
||||||
|
|
||||||
|
Public ReadOnly Property Export_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdExport Is Nothing Then
|
||||||
|
m_cmdExport = New Command(AddressOf Export)
|
||||||
|
End If
|
||||||
|
Return m_cmdExport
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Export()
|
||||||
|
Dim ExportMode As ImportExportMachiningPanelVM.WindowModeEnum = ImportExportMachiningPanelVM.WindowModeEnum.EXPORT
|
||||||
|
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 AndAlso (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||||
|
ExportMode = ImportExportMachiningPanelVM.WindowModeEnum.EXPORT_ORIG
|
||||||
|
End If
|
||||||
|
Dim ExportWindowVM As New ImportExportMachiningPanelVM(ImportExportMachiningPanelVM.WindowTypeEnum.MATERIAL, ExportMode)
|
||||||
|
Dim ExportWindowV As New ImportExportMachiningPanelV(Application.Current.MainWindow, ExportWindowVM)
|
||||||
|
ExportWindowV.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Export
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,120 +0,0 @@
|
|||||||
<UserControl x:Class="ModifyPartPanelV"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:local="clr-namespace:Icarus"
|
|
||||||
Width="150"
|
|
||||||
Margin="5,0,0,0">
|
|
||||||
<Grid DockPanel.Dock="Left">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Border Style="{StaticResource LeftPanelTitle_Border}">
|
|
||||||
<TextBlock Text="Part entity list"
|
|
||||||
FontWeight="DemiBold"
|
|
||||||
FontSize="14"/>
|
|
||||||
</Border>
|
|
||||||
<!--<DockPanel Grid.Row="1">
|
|
||||||
<Button DockPanel.Dock="Left"
|
|
||||||
Content="+"
|
|
||||||
FontSize="20"
|
|
||||||
Command="{Binding AddPart_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_Button}"/>
|
|
||||||
<Button DockPanel.Dock="Left"
|
|
||||||
Content="-"
|
|
||||||
FontSize="20"
|
|
||||||
Command="{Binding RemovePart_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_Button}"/>
|
|
||||||
<Button Content="Reference"
|
|
||||||
Command="{Binding SetReference_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
|
||||||
</DockPanel>-->
|
|
||||||
<TreeView Grid.Row="2"
|
|
||||||
ItemsSource="{Binding ModifyPartList}"
|
|
||||||
MinHeight="300">
|
|
||||||
<TreeView.Resources>
|
|
||||||
<HierarchicalDataTemplate DataType="{x:Type local:ModifyPart}"
|
|
||||||
ItemsSource="{Binding LayerList}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="/Resources/TreeView/Folder.png"
|
|
||||||
Height="15"/>
|
|
||||||
<TextBlock Text="{Binding ghName}" />
|
|
||||||
</StackPanel>
|
|
||||||
</HierarchicalDataTemplate>
|
|
||||||
<HierarchicalDataTemplate DataType="{x:Type local:ModifyLayer}"
|
|
||||||
ItemsSource="{Binding EntityList, UpdateSourceTrigger=PropertyChanged}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="/Resources/TreeView/Folder.png"
|
|
||||||
Height="15"/>
|
|
||||||
<TextBlock Text="{Binding sName}" />
|
|
||||||
</StackPanel>
|
|
||||||
</HierarchicalDataTemplate>
|
|
||||||
<HierarchicalDataTemplate DataType="{x:Type local:ModifyEntity}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<!--<Image Source="/WpfTutorialSamples;component/Images/user.png" Margin="0,0,5,0" />-->
|
|
||||||
<TextBlock Text="{Binding ghName}" />
|
|
||||||
<TextBlock Text="{Binding ghReference, UpdateSourceTrigger=PropertyChanged}"/>
|
|
||||||
</StackPanel>
|
|
||||||
</HierarchicalDataTemplate>
|
|
||||||
<!-- Menu' tasto destro -->
|
|
||||||
<ContextMenu x:Key="RowMenu" ItemsSource="{Binding MenuList}" >
|
|
||||||
<ContextMenu.ItemContainerStyle>
|
|
||||||
<Style TargetType="MenuItem">
|
|
||||||
<Setter Property="Command" Value="{Binding MenuItem_Command}"/>
|
|
||||||
<Setter Property="CommandParameter" Value="{Binding MenuItem_Command}"/>
|
|
||||||
<Setter Property="Header" Value="{Binding sMsg}"/>
|
|
||||||
</Style>
|
|
||||||
</ContextMenu.ItemContainerStyle>
|
|
||||||
</ContextMenu>
|
|
||||||
</TreeView.Resources>
|
|
||||||
<TreeView.ItemContainerStyle>
|
|
||||||
<Style TargetType="{x:Type TreeViewItem}">
|
|
||||||
<Setter Property="IsSelected" Value="{Binding bIsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
||||||
<Setter Property="IsExpanded" Value="True" />
|
|
||||||
<Setter Property="ContextMenu" Value="{StaticResource RowMenu}" />
|
|
||||||
</Style>
|
|
||||||
</TreeView.ItemContainerStyle>
|
|
||||||
</TreeView>
|
|
||||||
<!--<Border Grid.Row="3"
|
|
||||||
Style="{StaticResource LeftPanelTitle_Border}">
|
|
||||||
<TextBlock Text="Lista entità importate"
|
|
||||||
FontWeight="DemiBold"
|
|
||||||
FontSize="14"/>
|
|
||||||
</Border>
|
|
||||||
<ListBox Grid.Row="4"
|
|
||||||
ItemsSource="{Binding ImportedEntityList, UpdateSourceTrigger=PropertyChanged}"
|
|
||||||
SelectedItem="{Binding SelImportedEntity}"
|
|
||||||
MinHeight="200">
|
|
||||||
<ListBox.ItemContainerStyle>
|
|
||||||
<Style TargetType="ListBoxItem">
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
||||||
</Style>
|
|
||||||
</ListBox.ItemContainerStyle>
|
|
||||||
<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Grid HorizontalAlignment="Stretch">
|
|
||||||
<Grid.InputBindings>
|
|
||||||
<MouseBinding Gesture="LeftDoubleClick"
|
|
||||||
Command="{Binding ImportedEntity_DoubleClick}"/>
|
|
||||||
</Grid.InputBindings>
|
|
||||||
<TextBlock Text="{Binding ghName}">
|
|
||||||
</TextBlock>
|
|
||||||
</Grid>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>
|
|
||||||
</ListBox>-->
|
|
||||||
<UniformGrid Grid.Row="5"
|
|
||||||
Rows="1">
|
|
||||||
<Button Content="Ok"
|
|
||||||
Command="{Binding Ok_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
|
||||||
<!--<Button Content="Cancel"
|
|
||||||
Command="{Binding Cancel_Command}"
|
|
||||||
Style="{StaticResource LeftPanel_TextButton}"/>-->
|
|
||||||
</UniformGrid>
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Public Class ModifyPartPanelV
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,407 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class ModifyPartPanelVM
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
'Private m_nImportedPartId As Integer = GDB_ID.NULL
|
|
||||||
'Friend ReadOnly Property nImportedPartId As Integer
|
|
||||||
' Get
|
|
||||||
' Return m_nImportedPartId
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Private m_ImportedEntityList As New ObservableCollection(Of GeomEntity)
|
|
||||||
'Public Property ImportedEntityList As ObservableCollection(Of GeomEntity)
|
|
||||||
' Get
|
|
||||||
' Return m_ImportedEntityList
|
|
||||||
' End Get
|
|
||||||
' Set(value As ObservableCollection(Of GeomEntity))
|
|
||||||
' m_ImportedEntityList = value
|
|
||||||
' End Set
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Private m_SelImportedEntity As GeomEntity
|
|
||||||
'Public Property SelImportedEntity As GeomEntity
|
|
||||||
' Get
|
|
||||||
' Return m_SelImportedEntity
|
|
||||||
' End Get
|
|
||||||
' Set(value As GeomEntity)
|
|
||||||
' m_SelImportedEntity = value
|
|
||||||
' EgtDeselectAll()
|
|
||||||
' If Not IsNothing(m_SelImportedEntity) Then
|
|
||||||
' EgtSelectObj(m_SelImportedEntity.nId)
|
|
||||||
' End If
|
|
||||||
' EgtDraw()
|
|
||||||
' End Set
|
|
||||||
'End Property
|
|
||||||
'Friend Sub SetSelImportedEntity(nId As Integer)
|
|
||||||
' m_SelImportedEntity = Map.refImportPanelVM.ImportedEntityList.FirstOrDefault(Function(x) x.nId = nId)
|
|
||||||
' EgtDeselectAll()
|
|
||||||
' If Not IsNothing(m_SelImportedEntity) Then
|
|
||||||
' EgtSelectObj(m_SelImportedEntity.nId)
|
|
||||||
' End If
|
|
||||||
' EgtDraw()
|
|
||||||
' NotifyPropertyChanged(NameOf(SelImportedEntity))
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Private m_ModifyPartList As New ObservableCollection(Of ModifyPart)
|
|
||||||
Public ReadOnly Property ModifyPartList As ObservableCollection(Of ModifyPart)
|
|
||||||
Get
|
|
||||||
Return m_ModifyPartList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_SelModifyPart As ModifyPart
|
|
||||||
Friend Sub SetSelModifyPart(SelModifyPart As ModifyPart)
|
|
||||||
m_SelModifyPart = SelModifyPart
|
|
||||||
m_SelModifyLayer = Nothing
|
|
||||||
End Sub
|
|
||||||
Public ReadOnly Property SelModifyPart As ModifyPart
|
|
||||||
Get
|
|
||||||
Return m_SelModifyPart
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_SelModifyLayer As ModifyLayer
|
|
||||||
Public ReadOnly Property SelModifyLayer As ModifyLayer
|
|
||||||
Get
|
|
||||||
Return m_SelModifyLayer
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Friend Sub SetSelModifyLayer(SelModifyLayer As ModifyLayer)
|
|
||||||
m_SelModifyPart = m_ModifyPartList.FirstOrDefault(Function(x) x.LayerList.Contains(SelModifyLayer))
|
|
||||||
m_SelModifyLayer = SelModifyLayer
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private m_SelModifyEntity As ModifyEntity
|
|
||||||
Public ReadOnly Property SelModifyEntity As ModifyEntity
|
|
||||||
Get
|
|
||||||
Return m_SelModifyEntity
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Friend Sub SetSelModifyEntity(SelModifyEntity As ModifyEntity)
|
|
||||||
For Each CurrPart In m_ModifyPartList
|
|
||||||
Dim CurrLayer As ModifyLayer = CurrPart.LayerList.FirstOrDefault(Function(x) x.EntityList.Contains(SelModifyEntity))
|
|
||||||
If Not IsNothing(CurrLayer) Then
|
|
||||||
m_SelModifyPart = CurrPart
|
|
||||||
m_SelModifyLayer = CurrLayer
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
m_SelModifyEntity = SelModifyEntity
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' Definizione comandi
|
|
||||||
Private m_cmdOk As ICommand
|
|
||||||
Private m_cmdCancel As ICommand
|
|
||||||
|
|
||||||
Sub New()
|
|
||||||
' Creo riferimento a questa classe in EgtCAM5Map
|
|
||||||
Map.SetRefModifyPartPanelVM(Me)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
Friend Sub Init()
|
|
||||||
m_ModifyPartList.Clear()
|
|
||||||
' carico pezzi in lista
|
|
||||||
For Each PrintPart In Map.refTopPanelVM.PartList
|
|
||||||
m_ModifyPartList.Add(New ModifyPart(PrintPart))
|
|
||||||
Next
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
|
||||||
|
|
||||||
'#Region "SetReference"
|
|
||||||
|
|
||||||
' Public ReadOnly Property SetReference_Command As ICommand
|
|
||||||
' Get
|
|
||||||
' If m_cmdSetReference Is Nothing Then
|
|
||||||
' m_cmdSetReference = New Command(AddressOf SetReference)
|
|
||||||
' End If
|
|
||||||
' Return m_cmdSetReference
|
|
||||||
' End Get
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Sub SetReference()
|
|
||||||
' If Not IsNothing(SelGeomEntity) Then
|
|
||||||
' Dim ChooseReferenceWndVM As New ChooseReferenceWndVM
|
|
||||||
' Dim ChooseReferenceWndV As New ChooseReferenceWndV(Application.Current.MainWindow, ChooseReferenceWndVM)
|
|
||||||
' If Not ChooseReferenceWndV.ShowDialog() Then Return
|
|
||||||
' SelGeomEntity.Reference = ChooseReferenceWndVM.SelReference
|
|
||||||
' End If
|
|
||||||
' End Sub
|
|
||||||
|
|
||||||
'#End Region ' SetReference
|
|
||||||
|
|
||||||
'#Region "AddPart"
|
|
||||||
|
|
||||||
' Public ReadOnly Property AddPart_Command As ICommand
|
|
||||||
' Get
|
|
||||||
' If m_cmdAddPart Is Nothing Then
|
|
||||||
' m_cmdAddPart = New Command(AddressOf AddPart)
|
|
||||||
' End If
|
|
||||||
' Return m_cmdAddPart
|
|
||||||
' End Get
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Sub AddPart()
|
|
||||||
' m_ImportPartList.Add(New ImportPart)
|
|
||||||
' End Sub
|
|
||||||
|
|
||||||
'#End Region ' AddPart
|
|
||||||
|
|
||||||
'#Region "RemovePart"
|
|
||||||
|
|
||||||
' Public ReadOnly Property RemovePart_Command As ICommand
|
|
||||||
' Get
|
|
||||||
' If m_cmdRemovePart Is Nothing Then
|
|
||||||
' m_cmdRemovePart = New Command(AddressOf RemovePart)
|
|
||||||
' End If
|
|
||||||
' Return m_cmdRemovePart
|
|
||||||
' End Get
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Sub RemovePart()
|
|
||||||
' If IsNothing(SelImportLayer) Then
|
|
||||||
' ' rimuovo pezzo
|
|
||||||
' m_ImportPartList.Remove(SelImportPart)
|
|
||||||
' Else
|
|
||||||
' ' rimuovo geometria
|
|
||||||
' Dim CurrEntity As GeomEntity = m_SelGeomEntity
|
|
||||||
' SelImportLayer.EntityList.Remove(m_SelGeomEntity)
|
|
||||||
' ' la rimetto in lista importati
|
|
||||||
' ImportedEntityList.Add(CurrEntity)
|
|
||||||
' End If
|
|
||||||
' End Sub
|
|
||||||
|
|
||||||
'#End Region ' RemovePart
|
|
||||||
|
|
||||||
#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 sErr As New List(Of String)
|
|
||||||
'' verifico che tutti i pezzi abbiano una superficie da stampare nel layer apposito
|
|
||||||
'For Each CurrPart In m_ImportPartList
|
|
||||||
' For Each CurrLayer In CurrPart.LayerList
|
|
||||||
' Select Case CurrLayer.Type
|
|
||||||
' Case ImportLayer.LayerType.PRINT_SOLID
|
|
||||||
' If CurrLayer.EntityList.Count = 0 Then
|
|
||||||
' If sErr.Count > 0 Then sErr(sErr.Count - 1) &= Environment.NewLine
|
|
||||||
' sErr.Add(CurrPart.ghName & " - No print surface defined!")
|
|
||||||
' End If
|
|
||||||
' End Select
|
|
||||||
' Next
|
|
||||||
'Next
|
|
||||||
'If sErr.Count > 0 Then
|
|
||||||
' MessageBox.Show(String.Concat(sErr), "Error")
|
|
||||||
' Return
|
|
||||||
'Else
|
|
||||||
' ' Creo pezzi e layer necessari
|
|
||||||
' For Each ImportPart In m_ImportPartList
|
|
||||||
' Dim frImportedPart As New Frame3d
|
|
||||||
' EgtGetGroupGlobFrame(m_nImportedPartId, frImportedPart)
|
|
||||||
' Dim nPartId As Integer = EgtCreateGroup(GDB_ID.ROOT, frImportedPart)
|
|
||||||
' EgtSetName(nPartId, PART)
|
|
||||||
' Dim nFrameId As Integer = GDB_ID.NULL
|
|
||||||
' Dim b3PrintSolid As New BBox3d
|
|
||||||
' Dim nPrintPartLayerId As Integer = GDB_ID.NULL
|
|
||||||
' Dim PrintSolidEntity As GeomEntity = Nothing
|
|
||||||
' Dim nOriginalPartLayerId As Integer = GDB_ID.NULL
|
|
||||||
' Dim nRibsLayerId As Integer = GDB_ID.NULL
|
|
||||||
' Dim nShellNumberLayerId As Integer = GDB_ID.NULL
|
|
||||||
' Dim nAuxSolidsLayerId As Integer = GDB_ID.NULL
|
|
||||||
' Dim nMachStartLayerId As Integer = GDB_ID.NULL
|
|
||||||
' Dim nOthersLayerId As Integer = GDB_ID.NULL
|
|
||||||
' For Each ImportLayer In ImportPart.LayerList
|
|
||||||
' Select Case ImportLayer.Type
|
|
||||||
' Case ImportLayer.LayerType.PRINT_SOLID
|
|
||||||
' nPrintPartLayerId = EgtCreateGroup(nPartId)
|
|
||||||
' EgtSetName(nPrintPartLayerId, PRINT_SOLID)
|
|
||||||
' If ImportLayer.EntityList.Count > 0 Then
|
|
||||||
' PrintSolidEntity = ImportLayer.EntityList(0)
|
|
||||||
' EgtRelocateGlob(PrintSolidEntity.nId, nPrintPartLayerId, GDB_POS.LAST_SON)
|
|
||||||
' ' calcolo box superficie per creazione riferimento
|
|
||||||
' EgtGetBBoxGlob(PrintSolidEntity.nId, GDB_BB.STANDARD, b3PrintSolid)
|
|
||||||
' End If
|
|
||||||
' 'Case ImportLayer.LayerType.ORIGINAL_SOLID
|
|
||||||
' ' nOriginalPartLayerId = EgtCreateGroup(nPartId)
|
|
||||||
' ' EgtSetName(nOriginalPartLayerId, ORIGINAL_SOLID)
|
|
||||||
' ' For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
' ' EgtRelocateGlob(GeomEntity.nId, nOriginalPartLayerId, GDB_POS.LAST_SON)
|
|
||||||
' ' Next
|
|
||||||
' Case ImportLayer.LayerType.MACH_START
|
|
||||||
' nMachStartLayerId = EgtCreateGroup(nPartId)
|
|
||||||
' EgtSetName(nMachStartLayerId, LAY_MACH_START)
|
|
||||||
' Dim nMachStartId As Integer = GDB_ID.NULL
|
|
||||||
' If ImportLayer.EntityList.Count > 0 Then
|
|
||||||
' For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
' ' se punto o curva compo
|
|
||||||
' Dim EntityType As GDB_TY = EgtGetType(GeomEntity.nId)
|
|
||||||
' Select Case EntityType
|
|
||||||
' Case GDB_TY.GEO_POINT, GDB_TY.CRV_COMPO
|
|
||||||
' ' gli cambio layer
|
|
||||||
' EgtRelocateGlob(GeomEntity.nId, nMachStartLayerId, GDB_POS.LAST_SON)
|
|
||||||
' nMachStartId = GeomEntity.nId
|
|
||||||
' Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
|
|
||||||
' ' altrimenti la trasformo in curva compo
|
|
||||||
' nMachStartId = EgtCreateCurveCompo(nMachStartLayerId, GeomEntity.nId, True)
|
|
||||||
' End Select
|
|
||||||
' EgtSetName(nMachStartId, START_GEOM)
|
|
||||||
' ' coloro l'entita' di rosso
|
|
||||||
' Dim c3Red As Color3d
|
|
||||||
' c3Red.FromColor(System.Drawing.Color.Red)
|
|
||||||
' EgtSetColor(nMachStartId, c3Red)
|
|
||||||
' Next
|
|
||||||
' Else
|
|
||||||
' ' creo punto di partenza
|
|
||||||
' Dim ptStart As Point3d = b3PrintSolid.Center() - 0.6 * b3PrintSolid.DimY() * Vector3d.Y_AX() - 0.5 * b3PrintSolid.DimZ() * Vector3d.Z_AX()
|
|
||||||
' nMachStartId = EgtCreateGeoPoint(nMachStartLayerId, ptStart, GDB_RT.GLOB)
|
|
||||||
' EgtSetName(nMachStartId, START_GEOM)
|
|
||||||
' ' coloro l'entita' di rosso
|
|
||||||
' Dim c3Red As Color3d
|
|
||||||
' c3Red.FromColor(System.Drawing.Color.Red)
|
|
||||||
' EgtSetColor(nMachStartId, c3Red)
|
|
||||||
' End If
|
|
||||||
' Case ImportLayer.LayerType.RIBS
|
|
||||||
' nRibsLayerId = EgtCreateGroup(nPartId)
|
|
||||||
' EgtSetName(nRibsLayerId, LAY_RIBS)
|
|
||||||
' For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
' EgtSetInfo(GeomEntity.nId, KEY_RIB_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
|
||||||
' EgtRelocateGlob(GeomEntity.nId, nRibsLayerId, GDB_POS.LAST_SON)
|
|
||||||
' ' coloro l'entita' di viola
|
|
||||||
' Dim c3LightBlue As Color3d
|
|
||||||
' c3LightBlue.FromColor(System.Drawing.Color.MediumOrchid)
|
|
||||||
' EgtSetColor(GeomEntity.nId, c3LightBlue)
|
|
||||||
' Next
|
|
||||||
' Case ImportLayer.LayerType.SHELL_NUMBER
|
|
||||||
' nShellNumberLayerId = EgtCreateGroup(nPartId)
|
|
||||||
' EgtSetName(nShellNumberLayerId, LAY_SHELL_NBR)
|
|
||||||
' For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
' EgtSetInfo(GeomEntity.nId, KEY_SHELLNBR_TYPE, ShellNumberEntity.ShellNumberTypes.FROMIMPORT)
|
|
||||||
' EgtRelocateGlob(GeomEntity.nId, nShellNumberLayerId, GDB_POS.LAST_SON)
|
|
||||||
' ' coloro l'entita' di verde
|
|
||||||
' Dim c3LightBlue As Color3d
|
|
||||||
' c3LightBlue.FromColor(System.Drawing.Color.Lime)
|
|
||||||
' EgtSetColor(GeomEntity.nId, c3LightBlue)
|
|
||||||
' Next
|
|
||||||
' Case ImportLayer.LayerType.AUX_SOLIDS
|
|
||||||
' nAuxSolidsLayerId = EgtCreateGroup(nPartId)
|
|
||||||
' EgtSetName(nAuxSolidsLayerId, LAY_AUX_SOLIDS)
|
|
||||||
' For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
' EgtSetInfo(GeomEntity.nId, KEY_AUXSOLID_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
|
||||||
' EgtRelocateGlob(GeomEntity.nId, nAuxSolidsLayerId, GDB_POS.LAST_SON)
|
|
||||||
' ' coloro l'entita' di oro
|
|
||||||
' Dim c3LightBlue As Color3d
|
|
||||||
' c3LightBlue.FromColor(System.Drawing.Color.DarkGoldenrod)
|
|
||||||
' EgtSetColor(GeomEntity.nId, c3LightBlue)
|
|
||||||
' Next
|
|
||||||
' Case ImportLayer.LayerType.OTHERS
|
|
||||||
' nOthersLayerId = EgtCreateGroup(nPartId)
|
|
||||||
' EgtSetName(nOthersLayerId, LAY_OTHERS)
|
|
||||||
' For Each GeomEntity In ImportLayer.EntityList
|
|
||||||
' EgtRelocateGlob(GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON)
|
|
||||||
' Next
|
|
||||||
' End Select
|
|
||||||
' Next
|
|
||||||
' ' aggiungo riferimento
|
|
||||||
' Dim nReferenceLayerId As Integer = EgtCreateGroup(nPartId)
|
|
||||||
' EgtSetName(nReferenceLayerId, LAY_REFERENCE)
|
|
||||||
' ' Creo riferimento
|
|
||||||
' Dim ptOrig As New Point3d(b3PrintSolid.Min())
|
|
||||||
' Select Case PrintSolidEntity.Reference
|
|
||||||
' Case ChooseReferenceWndVM.References.TL
|
|
||||||
' ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX
|
|
||||||
' Case ChooseReferenceWndVM.References.TR
|
|
||||||
' ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX + b3PrintSolid.DimX() * Vector3d.X_AX
|
|
||||||
' Case ChooseReferenceWndVM.References.BL
|
|
||||||
' Case ChooseReferenceWndVM.References.BR
|
|
||||||
' ptOrig += b3PrintSolid.DimX() * Vector3d.X_AX
|
|
||||||
' Case ChooseReferenceWndVM.References.TC
|
|
||||||
' ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX + b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
|
||||||
' Case ChooseReferenceWndVM.References.ML
|
|
||||||
' ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX
|
|
||||||
' Case ChooseReferenceWndVM.References.MR
|
|
||||||
' ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX + b3PrintSolid.DimX() * Vector3d.X_AX
|
|
||||||
' Case ChooseReferenceWndVM.References.TC
|
|
||||||
' ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX + b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
|
||||||
' Case ChooseReferenceWndVM.References.MR
|
|
||||||
' ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX + b3PrintSolid.DimX() * Vector3d.X_AX
|
|
||||||
' Case ChooseReferenceWndVM.References.BC
|
|
||||||
' ptOrig += b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
|
||||||
' Case ChooseReferenceWndVM.References.MC
|
|
||||||
' ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX + b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
|
||||||
' End Select
|
|
||||||
' Dim frPrintSolid As New Frame3d(ptOrig)
|
|
||||||
' nFrameId = EgtCreateGeoFrame(nReferenceLayerId, frPrintSolid, GDB_RT.GLOB)
|
|
||||||
' If nFrameId Then
|
|
||||||
' EgtSetName(nFrameId, FRAME_PART)
|
|
||||||
' EgtSetMode(nFrameId, GDB_MD.LOCKED)
|
|
||||||
' End If
|
|
||||||
' EgtSetInfo(nReferenceLayerId, KEY_REFERENCE, PrintSolidEntity.Reference)
|
|
||||||
' ' appoggio il pezzo sulla tavola
|
|
||||||
' EgtMove( nPartId, New Vector3d(0, 0, -b3PrintSolid.Min.z))
|
|
||||||
' ' lo aggiungo a lista pezzi
|
|
||||||
' Dim sFilePath As String = ""
|
|
||||||
' EgtGetInfo(m_nImportedPartId, FILE_PATH, sFilePath)
|
|
||||||
' EgtSetInfo(nPartId, FILE_PATH, sFilePath)
|
|
||||||
' EgtSetInfo(nPartId, "PartOnTable", 1)
|
|
||||||
' Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, PrintSolidEntity.nId, nOriginalPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
|
|
||||||
' Map.refTopPanelVM.PartList.Add(NewPart)
|
|
||||||
' Next
|
|
||||||
'End If
|
|
||||||
''EgtAddMachGroup("3dPrint")
|
|
||||||
''EgtSetTable("Tab")
|
|
||||||
|
|
||||||
''Dim nRawId As Integer = EgtAddRawPart(b3PrintSolid.Min, b3PrintSolid.DimX, b3PrintSolid.DimY, b3PrintSolid.DimZ, New Color3d(128, 128, 128, 30))
|
|
||||||
''EgtAddPartToRawPart(nPartId, b3PrintSolid.Min, nRawId)
|
|
||||||
''EgtMoveToCornerRawPart(nRawId, New Point3d(dPosX, dPosY, 0), MCH_CR.BL)
|
|
||||||
|
|
||||||
''EgtResetCurrMachGroup()
|
|
||||||
|
|
||||||
'' seleziono ultimo pezzo aggiunto
|
|
||||||
'Map.refTopPanelVM.SelLastPart()
|
|
||||||
'' elimino vecchio pezzo d'importazione
|
|
||||||
'EgtErase(m_nImportedPartId)
|
|
||||||
|
|
||||||
'EgtDraw()
|
|
||||||
' ripristino modalita' standard
|
|
||||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' Ok
|
|
||||||
|
|
||||||
#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()
|
|
||||||
' ripristino modalita' standard
|
|
||||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' Cancel
|
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,435 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class ModifyEntity
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
' layer sotto cui e' questa entita'
|
|
||||||
Private m_OrigLayer As ModifyLayer
|
|
||||||
Friend ReadOnly Property OrigLayer As ModifyLayer
|
|
||||||
Get
|
|
||||||
Return m_OrigLayer
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_bIsSelected As Boolean
|
|
||||||
Public Property bIsSelected As Boolean
|
|
||||||
Get
|
|
||||||
Return m_bIsSelected
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_bIsSelected = value
|
|
||||||
' seleziono in scena
|
|
||||||
EgtDeselectAll()
|
|
||||||
If Not IsNothing(value) Then
|
|
||||||
EgtSelectObj(m_nId)
|
|
||||||
End If
|
|
||||||
EgtDraw()
|
|
||||||
' segno come elemento selezionato in treeview
|
|
||||||
Map.refModifyPartPanelVM.SetSelModifyEntity(Me)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_nId As Integer = GDB_ID.NULL
|
|
||||||
Public ReadOnly Property nId As Integer
|
|
||||||
Get
|
|
||||||
Return m_nId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_sName As String
|
|
||||||
Public ReadOnly Property sName As String
|
|
||||||
Get
|
|
||||||
Return m_sName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property ghName As String
|
|
||||||
Get
|
|
||||||
Return m_nId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_MenuList As New List(Of MenuItemVm)
|
|
||||||
Public Property MenuList As List(Of MenuItemVm)
|
|
||||||
Get
|
|
||||||
Return m_MenuList
|
|
||||||
End Get
|
|
||||||
Set(value As List(Of MenuItemVm))
|
|
||||||
m_MenuList = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Sub New(nId As Integer, sName As String, OrigLayer As ModifyLayer)
|
|
||||||
m_nId = nId
|
|
||||||
m_sName = sName
|
|
||||||
m_OrigLayer = OrigLayer
|
|
||||||
' aggiungo voci layer a contextmenu
|
|
||||||
CreateContextMenu(OrigLayer)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub UpdateContextMenu(OrigLayer As ModifyLayer)
|
|
||||||
m_MenuList.Clear()
|
|
||||||
' aggiungo voci layer a contextmenu
|
|
||||||
CreateContextMenu(OrigLayer)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub CreateContextMenu(OrigLayer As ModifyLayer)
|
|
||||||
For Each ProjectPart In Map.refTopPanelVM.PartList
|
|
||||||
' verifico in quali layer puo' andare questo elemento
|
|
||||||
Dim EntityType As GDB_TY = EgtGetType(nId)
|
|
||||||
Select Case EntityType
|
|
||||||
Case GDB_TY.GEO_POINT, GDB_TY.CRV_COMPO, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
|
|
||||||
' recupero i layer
|
|
||||||
If OrigLayer.Type <> ModifyLayer.LayerType.MACH_START Then m_MenuList.Add(New MenuItemVm(Me, OrigLayer, ModifyLayer.LayerType.MACH_START, ProjectPart))
|
|
||||||
If OrigLayer.Type <> ModifyLayer.LayerType.OTHERS Then m_MenuList.Add(New MenuItemVm(Me, OrigLayer, ModifyLayer.LayerType.OTHERS, ProjectPart))
|
|
||||||
Case GDB_TY.SRF_MESH
|
|
||||||
' verifico se volume chiuso
|
|
||||||
If OrigLayer.Type <> ModifyLayer.LayerType.PRINT_SOLID Then m_MenuList.Add(New MenuItemVm(Me, OrigLayer, ModifyLayer.LayerType.PRINT_SOLID, ProjectPart))
|
|
||||||
If OrigLayer.Type <> ModifyLayer.LayerType.SHELL_NUMBER Then m_MenuList.Add(New MenuItemVm(Me, OrigLayer, ModifyLayer.LayerType.SHELL_NUMBER, ProjectPart))
|
|
||||||
If OrigLayer.Type <> ModifyLayer.LayerType.AUX_SOLIDS Then m_MenuList.Add(New MenuItemVm(Me, OrigLayer, ModifyLayer.LayerType.AUX_SOLIDS, ProjectPart))
|
|
||||||
If OrigLayer.Type <> ModifyLayer.LayerType.RIBS Then m_MenuList.Add(New MenuItemVm(Me, OrigLayer, ModifyLayer.LayerType.RIBS, ProjectPart))
|
|
||||||
If OrigLayer.Type <> ModifyLayer.LayerType.OTHERS Then m_MenuList.Add(New MenuItemVm(Me, OrigLayer, ModifyLayer.LayerType.OTHERS, ProjectPart))
|
|
||||||
End Select
|
|
||||||
Next
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub UpdateOrigLayer(NewLayer As ModifyLayer)
|
|
||||||
m_OrigLayer = NewLayer
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class ModifyPart
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
Private m_bIsSelected As Boolean
|
|
||||||
Public Property bIsSelected As Boolean
|
|
||||||
Get
|
|
||||||
Return m_bIsSelected
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_bIsSelected = value
|
|
||||||
Map.refModifyPartPanelVM.SetSelModifyPart(Me)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_PrintPart As Print3dPartVM
|
|
||||||
Public ReadOnly Property PrintPart As Print3dPartVM
|
|
||||||
Get
|
|
||||||
Return m_PrintPart
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_sName As String
|
|
||||||
Public Property sName As String
|
|
||||||
Get
|
|
||||||
Return m_sName
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_sName = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property ghName As String
|
|
||||||
Get
|
|
||||||
Return m_PrintPart.sImportedFileName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_LayerList As New ObservableCollection(Of ModifyLayer)
|
|
||||||
Public ReadOnly Property LayerList As ObservableCollection(Of ModifyLayer)
|
|
||||||
Get
|
|
||||||
Return m_LayerList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Sub New(PrintPart As Print3dPartVM)
|
|
||||||
m_PrintPart = PrintPart
|
|
||||||
m_LayerList.Add(New ModifyLayer(ModifyLayer.LayerType.PRINT_SOLID, "Print", PrintPart))
|
|
||||||
m_LayerList.Add(New ModifyLayer(ModifyLayer.LayerType.MACH_START, "Layer Start", PrintPart))
|
|
||||||
m_LayerList.Add(New ModifyLayer(ModifyLayer.LayerType.RIBS, "Ribs", PrintPart))
|
|
||||||
m_LayerList.Add(New ModifyLayer(ModifyLayer.LayerType.SHELL_NUMBER, "Reduce Shell Number", PrintPart))
|
|
||||||
m_LayerList.Add(New ModifyLayer(ModifyLayer.LayerType.AUX_SOLIDS, "Filled Solids", PrintPart))
|
|
||||||
m_LayerList.Add(New ModifyLayer(ModifyLayer.LayerType.OTHERS, "Others", PrintPart))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class ModifyLayer
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
Public Enum LayerType As Integer
|
|
||||||
PRINT_SOLID = 1
|
|
||||||
MACH_START = 2
|
|
||||||
RIBS = 3
|
|
||||||
SHELL_NUMBER = 4
|
|
||||||
AUX_SOLIDS = 5
|
|
||||||
OTHERS = 6
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Private m_nLayerId As Integer
|
|
||||||
|
|
||||||
Private m_bIsSelected As Boolean
|
|
||||||
Public Property bIsSelected As Boolean
|
|
||||||
Get
|
|
||||||
Return m_bIsSelected
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_bIsSelected = value
|
|
||||||
Map.refModifyPartPanelVM.SetSelModifyLayer(Me)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_Type As LayerType
|
|
||||||
Public Property Type As LayerType
|
|
||||||
Get
|
|
||||||
Return m_Type
|
|
||||||
End Get
|
|
||||||
Set(value As LayerType)
|
|
||||||
m_Type = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_sName As String
|
|
||||||
Public Property sName As String
|
|
||||||
Get
|
|
||||||
Return m_sName
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_sName = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_EntityList As New ObservableCollection(Of ModifyEntity)
|
|
||||||
Public Property EntityList As ObservableCollection(Of ModifyEntity)
|
|
||||||
Get
|
|
||||||
Return m_EntityList
|
|
||||||
End Get
|
|
||||||
Set(value As ObservableCollection(Of ModifyEntity))
|
|
||||||
m_EntityList = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Sub New(Type As LayerType, sName As String)
|
|
||||||
m_Type = Type
|
|
||||||
m_sName = sName
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Sub New(Type As LayerType, sName As String, PrintPart As Print3dPartVM)
|
|
||||||
m_Type = Type
|
|
||||||
m_sName = sName
|
|
||||||
Select Case Type
|
|
||||||
Case LayerType.PRINT_SOLID
|
|
||||||
m_nLayerId = PrintPart.nPrintSolidLayerId
|
|
||||||
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
|
||||||
Dim sEntitytName As String = ""
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
m_EntityList.Add(New ModifyEntity(nEntityId, sEntitytName, Me))
|
|
||||||
Case LayerType.MACH_START
|
|
||||||
m_nLayerId = PrintPart.nMachStartLayerId
|
|
||||||
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
|
||||||
Dim sEntitytName As String = ""
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
While nEntityId <> GDB_ID.NULL
|
|
||||||
m_EntityList.Add(New ModifyEntity(nEntityId, sEntitytName, Me))
|
|
||||||
nEntityId = EgtGetNext(nEntityId)
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
End While
|
|
||||||
Case LayerType.RIBS
|
|
||||||
m_nLayerId = PrintPart.nRibsLayerId
|
|
||||||
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
|
||||||
Dim sEntitytName As String = ""
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
While nEntityId <> GDB_ID.NULL
|
|
||||||
Dim RibType As Integer = RibEntity.RibTypes.FROMDRAW
|
|
||||||
EgtGetInfo(nEntityId, KEY_RIB_TYPE, RibType)
|
|
||||||
If RibType = RibEntity.RibTypes.FROMIMPORT Then
|
|
||||||
m_EntityList.Add(New ModifyEntity(nEntityId, sEntitytName, Me))
|
|
||||||
End If
|
|
||||||
nEntityId = EgtGetNext(nEntityId)
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
End While
|
|
||||||
Case LayerType.SHELL_NUMBER
|
|
||||||
m_nLayerId = PrintPart.nShellNumberLayerId
|
|
||||||
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
|
||||||
Dim sEntitytName As String = ""
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
While nEntityId <> GDB_ID.NULL
|
|
||||||
Dim ShellType As Integer = ShellNumberEntity.ShellNumberTypes.FROMDRAW
|
|
||||||
EgtGetInfo(nEntityId, KEY_SHELLNBR_TYPE, ShellType)
|
|
||||||
If ShellType = ShellNumberEntity.ShellNumberTypes.FROMIMPORT Then
|
|
||||||
m_EntityList.Add(New ModifyEntity(nEntityId, sEntitytName, Me))
|
|
||||||
End If
|
|
||||||
nEntityId = EgtGetNext(nEntityId)
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
End While
|
|
||||||
Case LayerType.AUX_SOLIDS
|
|
||||||
m_nLayerId = PrintPart.nAuxSolidsLayerId
|
|
||||||
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
|
||||||
Dim sEntitytName As String = ""
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
While nEntityId <> GDB_ID.NULL
|
|
||||||
'Dim ShellType As Integer = ShellNumberEntity.ShellNumberTypes.FROMDRAW
|
|
||||||
'EgtGetInfo(nEntityId, KEY_SHELLNBR_TYPE, ShellType)
|
|
||||||
'If ShellType = ShellNumberEntity.ShellNumberTypes.FROMIMPORT Then
|
|
||||||
m_EntityList.Add(New ModifyEntity(nEntityId, sEntitytName, Me))
|
|
||||||
'End If
|
|
||||||
nEntityId = EgtGetNext(nEntityId)
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
End While
|
|
||||||
Case LayerType.OTHERS
|
|
||||||
m_nLayerId = PrintPart.nOthersLayerId
|
|
||||||
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
|
||||||
Dim sEntitytName As String = ""
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
While nEntityId <> GDB_ID.NULL
|
|
||||||
m_EntityList.Add(New ModifyEntity(nEntityId, sEntitytName, Me))
|
|
||||||
nEntityId = EgtGetNext(nEntityId)
|
|
||||||
EgtGetName(nEntityId, sEntitytName)
|
|
||||||
End While
|
|
||||||
End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class MenuItemVm
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
' enita' di origine
|
|
||||||
Private m_OrigEntity As ModifyEntity
|
|
||||||
Private m_OrigLayer As ModifyLayer
|
|
||||||
|
|
||||||
' pezzo in cui spostare
|
|
||||||
Private m_Part As Print3dPartVM
|
|
||||||
|
|
||||||
' tipo del layer indicato
|
|
||||||
Private m_Type As ModifyLayer.LayerType
|
|
||||||
Public Property Type As ModifyLayer.LayerType
|
|
||||||
Get
|
|
||||||
Return m_Type
|
|
||||||
End Get
|
|
||||||
Set(value As ModifyLayer.LayerType)
|
|
||||||
m_Type = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sMsg As String
|
|
||||||
Get
|
|
||||||
Dim sType As String = ""
|
|
||||||
Select Case m_Type
|
|
||||||
Case ModifyLayer.LayerType.PRINT_SOLID
|
|
||||||
sType = "Print"
|
|
||||||
Case ModifyLayer.LayerType.MACH_START
|
|
||||||
sType = "Layer Start"
|
|
||||||
Case ModifyLayer.LayerType.RIBS
|
|
||||||
sType = "Ribs"
|
|
||||||
Case ModifyLayer.LayerType.SHELL_NUMBER
|
|
||||||
sType = "Reduce shell number"
|
|
||||||
Case ModifyLayer.LayerType.AUX_SOLIDS
|
|
||||||
sType = "Filled Solids"
|
|
||||||
Case ModifyLayer.LayerType.OTHERS
|
|
||||||
sType = "Others"
|
|
||||||
End Select
|
|
||||||
Return "Move to " & sType
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' Definizione comando
|
|
||||||
Private m_cmdCommand As ICommand
|
|
||||||
|
|
||||||
Sub New(OrigEntity As ModifyEntity, OrigLayer As ModifyLayer, Type As ModifyLayer.LayerType, Part As Print3dPartVM)
|
|
||||||
m_OrigEntity = OrigEntity
|
|
||||||
m_OrigLayer = OrigLayer
|
|
||||||
m_Type = Type
|
|
||||||
m_Part = Part
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "Cancel"
|
|
||||||
|
|
||||||
Public ReadOnly Property MenuItem_Command As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdCommand Is Nothing Then
|
|
||||||
m_cmdCommand = New Command(AddressOf Command)
|
|
||||||
End If
|
|
||||||
Return m_cmdCommand
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Sub Command()
|
|
||||||
' recupero layer da pezzo
|
|
||||||
Dim nLayerId As Integer = GDB_ID.NULL
|
|
||||||
Select Case m_Type
|
|
||||||
Case ModifyLayer.LayerType.PRINT_SOLID
|
|
||||||
nLayerId = m_Part.nPrintSolidLayerId
|
|
||||||
Case ModifyLayer.LayerType.MACH_START
|
|
||||||
nLayerId = m_Part.nMachStartLayerId
|
|
||||||
Case ModifyLayer.LayerType.RIBS
|
|
||||||
nLayerId = m_Part.nRibsLayerId
|
|
||||||
Case ModifyLayer.LayerType.SHELL_NUMBER
|
|
||||||
nLayerId = m_Part.nShellNumberLayerId
|
|
||||||
Case ModifyLayer.LayerType.AUX_SOLIDS
|
|
||||||
nLayerId = m_Part.nAuxSolidsLayerId
|
|
||||||
Case ModifyLayer.LayerType.OTHERS
|
|
||||||
nLayerId = m_Part.nOthersLayerId
|
|
||||||
End Select
|
|
||||||
' sposto entita'
|
|
||||||
If EgtRelocateGlob(m_OrigEntity.nId, nLayerId) Then
|
|
||||||
' elimino info vecchio layer
|
|
||||||
Select Case m_OrigLayer.Type
|
|
||||||
Case ModifyLayer.LayerType.PRINT_SOLID
|
|
||||||
EgtResetMark(m_OrigEntity.nId)
|
|
||||||
Case ModifyLayer.LayerType.MACH_START
|
|
||||||
Case ModifyLayer.LayerType.RIBS
|
|
||||||
EgtRemoveInfo(m_OrigEntity.nId, KEY_RIB_TYPE)
|
|
||||||
Case ModifyLayer.LayerType.SHELL_NUMBER
|
|
||||||
EgtRemoveInfo(m_OrigEntity.nId, KEY_SHELLNBR_TYPE)
|
|
||||||
Case ModifyLayer.LayerType.AUX_SOLIDS
|
|
||||||
EgtRemoveInfo(m_OrigEntity.nId, KEY_AUXSOLID_TYPE)
|
|
||||||
Case ModifyLayer.LayerType.OTHERS
|
|
||||||
End Select
|
|
||||||
' sposto in lista
|
|
||||||
m_OrigLayer.EntityList.Remove(m_OrigEntity)
|
|
||||||
Dim NewPart As ModifyPart = Map.refModifyPartPanelVM.ModifyPartList.FirstOrDefault(Function(x) x.PrintPart.nPartId = m_Part.nPartId)
|
|
||||||
If Not IsNothing(NewPart) Then
|
|
||||||
Dim NewLayer As ModifyLayer = NewPart.LayerList.FirstOrDefault(Function(x) x.Type = m_Type)
|
|
||||||
If Not IsNothing(NewLayer) Then
|
|
||||||
NewLayer.EntityList.Add(m_OrigEntity)
|
|
||||||
' aggiorno riferimenti nell'entita'
|
|
||||||
m_OrigEntity.UpdateOrigLayer(NewLayer)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
' aggiungo info nuovo layer
|
|
||||||
Select Case m_Type
|
|
||||||
Case ModifyLayer.LayerType.PRINT_SOLID
|
|
||||||
EgtSetName(m_OrigEntity.nId, PRINT_SOLID)
|
|
||||||
EgtSetColor(m_OrigEntity.nId, c3Print)
|
|
||||||
Case ModifyLayer.LayerType.MACH_START
|
|
||||||
EgtSetName(m_OrigEntity.nId, LAY_MACH_START)
|
|
||||||
EgtSetColor(m_OrigEntity.nId, c3MachStart)
|
|
||||||
Case ModifyLayer.LayerType.RIBS
|
|
||||||
EgtSetName(m_OrigEntity.nId, LAY_RIBS)
|
|
||||||
EgtSetInfo(m_OrigEntity.nId, KEY_RIB_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
|
||||||
EgtSetColor(m_OrigEntity.nId, c3Rib)
|
|
||||||
Case ModifyLayer.LayerType.SHELL_NUMBER
|
|
||||||
EgtSetName(m_OrigEntity.nId, LAY_SHELL_NBR)
|
|
||||||
EgtSetInfo(m_OrigEntity.nId, KEY_SHELLNBR_TYPE, ShellNumberEntity.ShellNumberTypes.FROMIMPORT)
|
|
||||||
EgtSetColor(m_OrigEntity.nId, c3ShellNumber)
|
|
||||||
Case ModifyLayer.LayerType.AUX_SOLIDS
|
|
||||||
EgtSetName(m_OrigEntity.nId, LAY_AUX_SOLIDS)
|
|
||||||
EgtSetInfo(m_OrigEntity.nId, KEY_AUXSOLID_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
|
||||||
EgtSetColor(m_OrigEntity.nId, c3AuxSolids)
|
|
||||||
Case ModifyLayer.LayerType.OTHERS
|
|
||||||
EgtSetName(m_OrigEntity.nId, LAY_OTHERS)
|
|
||||||
EgtSetColor(m_OrigEntity.nId, c3Others)
|
|
||||||
End Select
|
|
||||||
EgtDraw()
|
|
||||||
' aggiorno riferimenti nel context menu item
|
|
||||||
m_OrigEntity.UpdateContextMenu(m_OrigEntity.OrigLayer)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' Cancel
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -11,6 +11,7 @@ Imports System.Windows
|
|||||||
|
|
||||||
' Review the values of the assembly attributes
|
' Review the values of the assembly attributes
|
||||||
|
|
||||||
|
#If PLATFORM = "x64" Then
|
||||||
#If DEBUG Then
|
#If DEBUG Then
|
||||||
<Assembly: AssemblyTitle("IcarusD64.exe")>
|
<Assembly: AssemblyTitle("IcarusD64.exe")>
|
||||||
<Assembly: AssemblyDescription("Icarus Debug 64 bit")>
|
<Assembly: AssemblyDescription("Icarus Debug 64 bit")>
|
||||||
@@ -18,9 +19,18 @@ Imports System.Windows
|
|||||||
<Assembly: AssemblyTitle("IcarusR64.exe")>
|
<Assembly: AssemblyTitle("IcarusR64.exe")>
|
||||||
<Assembly: AssemblyDescription("Icarus 64 bit")>
|
<Assembly: AssemblyDescription("Icarus 64 bit")>
|
||||||
#End If
|
#End If
|
||||||
|
#Else
|
||||||
|
#If DEBUG Then
|
||||||
|
<Assembly: AssemblyTitle("IcarusD32.exe")>
|
||||||
|
<Assembly: AssemblyDescription("Icarus Debug 32 bit")>
|
||||||
|
#Else
|
||||||
|
<Assembly: AssemblyTitle("IcarusR32.exe")>
|
||||||
|
<Assembly: AssemblyDescription("Icarus 32 bit")>
|
||||||
|
#End If
|
||||||
|
#End If
|
||||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("Icarus")>
|
<Assembly: AssemblyProduct("Icarus")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2022 by Egalware s.r.l.")>
|
<Assembly: AssemblyCopyright("Copyright © 2022-2023 by Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
<Assembly: ComVisible(false)>
|
<Assembly: ComVisible(false)>
|
||||||
|
|
||||||
@@ -60,5 +70,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.4.10.3")>
|
<Assembly: AssemblyVersion("2.5.8.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.4.10.3")>
|
<Assembly: AssemblyFileVersion("2.5.8.1")>
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="MachineBox"
|
|
||||||
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"
|
|
||||||
Height="160" Width="380" WindowStyle="None" ResizeMode="NoResize"
|
|
||||||
TitleBarHeight="30" IsResizable="False" IsMinimizable="False"
|
|
||||||
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
|
|
||||||
|
|
||||||
<Border BorderThickness="2" BorderBrush="LightBlue">
|
|
||||||
<Grid >
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="0.25*"/>
|
|
||||||
<ColumnDefinition Width="5*"/>
|
|
||||||
<ColumnDefinition Width="0.25*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="0.25*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="0.25*"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="0.25*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<TextBlock Name="MessageLbl" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center" />
|
|
||||||
<UniformGrid Grid.Column="1" Grid.Row="3" Columns="3">
|
|
||||||
<Button Name="ReplaceBtn" Height="26" Margin="0,0,5,0"/>
|
|
||||||
<Button Name="UpdateBtn" Height="26" Margin="5,0,5,0"/>
|
|
||||||
<Button Name="CancelBtn" IsDefault="True" Height="26" Margin="5,0,0,0"/>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
Imports EgtUILib
|
|
||||||
|
|
||||||
Public Class MachineBox
|
|
||||||
|
|
||||||
Public Shadows DialogResult As MessageBoxResult = MessageBoxResult.Cancel
|
|
||||||
|
|
||||||
Public Sub New( Owner As Window, sMachName As String)
|
|
||||||
|
|
||||||
InitializeComponent()
|
|
||||||
|
|
||||||
Me.Owner = Owner
|
|
||||||
|
|
||||||
Title = EgtMsg( 6534) ' Avviso
|
|
||||||
|
|
||||||
MessageLbl.Text = String.Format( EgtMsg( 6528), sMachName) ' La macchina "{0}" esiste già,<br/> cosa vuoi fare ?
|
|
||||||
|
|
||||||
ReplaceBtn.Content = EgtMsg( 6531) ' Sostituisci
|
|
||||||
|
|
||||||
UpdateBtn.Content = EgtMsg( 6532) ' Aggiorna
|
|
||||||
|
|
||||||
CancelBtn.Content = EgtMsg( 6533) ' Annulla
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ReplaceBtn_Click( sender As Object, e As RoutedEventArgs) Handles ReplaceBtn.Click
|
|
||||||
DialogResult = MessageBoxResult.Yes
|
|
||||||
Close()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub UpdateBtn_Click( sender As Object, e As RoutedEventArgs) Handles UpdateBtn.Click
|
|
||||||
DialogResult = MessageBoxResult.No
|
|
||||||
Close()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CancelBtn_Click( sender As Object, e As RoutedEventArgs) Handles CancelBtn.Click
|
|
||||||
DialogResult = MessageBoxResult.Cancel
|
|
||||||
Close()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overloads Function ShowDialog() As MessageBoxResult
|
|
||||||
MyBase.ShowDialog()
|
|
||||||
Return DialogResult
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
<EgtWPFLib5:EgtCustomWindow x:Class="OptionWindowV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:Icarus="clr-namespace:Icarus"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||||
|
Title="{Binding Title}" Icon="/Resources/Icarus.ico"
|
||||||
|
Background="Transparent"
|
||||||
|
AllowsTransparency="True"
|
||||||
|
BorderThickness="0"
|
||||||
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="0" IsResizable="False"
|
||||||
|
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||||
|
MinWidth="400" MinHeight="382"
|
||||||
|
Width="400" Height="412">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Margin="0,0,0,2.5"
|
||||||
|
Style="{StaticResource Title_Border}">
|
||||||
|
<TextBlock Text="SETTINGS"
|
||||||
|
Style="{StaticResource Title_TextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Grid.Row="1"
|
||||||
|
Margin="0,2.5,0,0"
|
||||||
|
CornerRadius="4"
|
||||||
|
Style="{StaticResource WhiteBottomBlueRow_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TabControl Margin="5,5,5,5">
|
||||||
|
<TabItem Header="{Binding GenericMsg}">
|
||||||
|
<StackPanel Margin="5,5,5,0">
|
||||||
|
<!--<GroupBox Header="{Binding CurrentLanguageMsg}"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<UniformGrid Rows="2" Margin="3,3,3,3">
|
||||||
|
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
|
||||||
|
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<TextBlock Text="{Binding LanguageAdvertMsg}" TextWrapping="Wrap"
|
||||||
|
TextAlignment="Center"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</GroupBox>-->
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="{Binding TopSceneBackgroundMsg}" VerticalAlignment="Center"/>
|
||||||
|
<Button Background="{Binding TopSceneBackground}"
|
||||||
|
Command="{Binding TopSceneBackground_Command}"
|
||||||
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="{Binding BotSceneBackgroundMsg}" VerticalAlignment="Center"/>
|
||||||
|
<Button Background="{Binding BotSceneBackground}"
|
||||||
|
Command="{Binding BotSceneBackground_Command}"
|
||||||
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="{Binding GridColorMsg}" VerticalAlignment="Center"/>
|
||||||
|
<Button Background="{Binding GridColor}"
|
||||||
|
Command="{Binding GridColor_Command}"
|
||||||
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center"
|
||||||
|
Grid.Row="0" Margin="0,5,0,5"/>
|
||||||
|
<CheckBox IsChecked="{Binding ThickLine}"
|
||||||
|
Grid.Column="1" Grid.Row="0" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Text="{Binding SmoothTriMeshMsg}" VerticalAlignment="Center"
|
||||||
|
Grid.Row="1" Margin="0,5,0,5"/>
|
||||||
|
<CheckBox IsChecked="{Binding SmoothTriMesh}"
|
||||||
|
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Margin="5,5,5,5">
|
||||||
|
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="{Binding CADMsg}">
|
||||||
|
<StackPanel Margin="5,5,5,0">
|
||||||
|
<UniformGrid Grid.ColumnSpan="2" Columns="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="{Binding GeometryToleranceMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding GeometryTolerance}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,0"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<ItemsControl ItemsSource="{Binding LayerColorList}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="{Binding Color_Msg}" VerticalAlignment="Center"/>
|
||||||
|
<Grid Margin="10,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="35"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Background="{Binding Background}"
|
||||||
|
Command="{Binding Color_Command}"
|
||||||
|
Margin="0,0,5,0"
|
||||||
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
|
<Slider Grid.Column="1"
|
||||||
|
Value="{Binding dAlpha}"
|
||||||
|
Minimum="10"
|
||||||
|
Maximum="100"
|
||||||
|
TickPlacement="BottomRight"
|
||||||
|
TickFrequency="10"
|
||||||
|
IsSnapToTickEnabled="True"
|
||||||
|
Margin="0,0,5,0"/>
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
Text="{Binding sAlpha}"
|
||||||
|
TextAlignment="Right"/>
|
||||||
|
</Grid>
|
||||||
|
</UniformGrid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="{Binding ImportMsg}">
|
||||||
|
<StackPanel Margin="5,5,5,0">
|
||||||
|
<Grid Margin="0,5,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.8*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="1"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||||
|
Text="{Binding UnitScaleMsg}" />
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="2"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||||
|
Text="{Binding FactorScaleMsg}"/>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||||
|
Text="{Binding DxfScaleFactorMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||||
|
ItemsSource="{Binding ScaleDXFList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedDXFScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="2"
|
||||||
|
Text="{Binding DxfScaleFactor}" Height="25"
|
||||||
|
IsEnabled="{Binding DXFScaleEnable, UpdateSourceTrigger=LostFocus}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
||||||
|
Text="{Binding StlScaleFactorMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox Grid.Row="2" Grid.Column="1"
|
||||||
|
ItemsSource="{Binding ScaleSTLList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedSTLScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="2"
|
||||||
|
Text="{Binding StlScaleFactor}" Height="25"
|
||||||
|
IsEnabled="{Binding STLScaleEnable, UpdateSourceTrigger=LostFocus}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
<!--<TabItem Header="{Binding ExportMsg}">
|
||||||
|
<StackPanel>
|
||||||
|
<GroupBox Grid.Column="1" Grid.RowSpan="2"
|
||||||
|
Header="{Binding ImageMsg}"
|
||||||
|
Margin="5,5,5,0">
|
||||||
|
<UniformGrid Grid.ColumnSpan="2" Columns="2">
|
||||||
|
<TextBlock Text="{Binding ImageWidthMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding ImageWidth}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBlock Text="{Binding ImageHeightMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding ImageHeight}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</GroupBox>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>-->
|
||||||
|
<TabItem Header="{Binding CAMMsg}">
|
||||||
|
<StackPanel>
|
||||||
|
<Grid Margin="5,5,5,0">
|
||||||
|
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,1"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Margin="5,5,5,0">
|
||||||
|
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<Button Grid.Row="1"
|
||||||
|
IsCancel="True"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</EgtWPFLib5:EgtCustomWindow>
|
||||||
@@ -1,303 +1,342 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="OptionWindowV"
|
<EgtWPFLib5:EgtMainWindow x:Class="OptionWindowV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:Icarus="clr-namespace:Icarus"
|
xmlns:Icarus="clr-namespace:Icarus"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
Style="{StaticResource Dialog_Window}"
|
||||||
Title="{Binding Title}" Icon="/Resources/Icarus.ico"
|
Title="{Binding Title}" Icon="/Resources/Icarus.ico"
|
||||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
WindowStyle="None" ResizeMode="NoResize"
|
||||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||||
MinWidth="400" MinHeight="382"
|
MinWidth="400" MinHeight="382"
|
||||||
Width="400" Height="412">
|
Width="400" Height="412">
|
||||||
|
|
||||||
<!--<EgtWPFLib5:EgtCustomWindow.Resources>
|
<!--<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||||
<local:GeomTypeConverter x:Key="GeomTypeConverter"/>
|
<local:GeomTypeConverter x:Key="GeomTypeConverter"/>
|
||||||
</EgtWPFLib5:EgtCustomWindow.Resources>-->
|
</EgtWPFLib5:EgtCustomWindow.Resources>-->
|
||||||
|
|
||||||
<TabControl Margin="5,5,5,5">
|
<Grid>
|
||||||
<TabItem Header="{Binding GenericMsg}">
|
<Grid.RowDefinitions>
|
||||||
<StackPanel Margin="5,5,5,0">
|
<RowDefinition Height="1*"/>
|
||||||
<!--<GroupBox Header="{Binding CurrentLanguageMsg}"
|
<RowDefinition Height="Auto"/>
|
||||||
Margin="0,0,0,5">
|
</Grid.RowDefinitions>
|
||||||
<UniformGrid Rows="2" Margin="3,3,3,3">
|
<TabControl Margin="5,5,5,5">
|
||||||
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
|
<TabItem Header="{Binding GenericMsg}">
|
||||||
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
|
<StackPanel Margin="5,5,5,0">
|
||||||
Margin="0,0,0,5"/>
|
<!--<GroupBox Header="{Binding CurrentLanguageMsg}"
|
||||||
<TextBlock Text="{Binding LanguageAdvertMsg}" TextWrapping="Wrap"
|
|
||||||
TextAlignment="Center"/>
|
|
||||||
</UniformGrid>
|
|
||||||
</GroupBox>-->
|
|
||||||
<UniformGrid Columns="2"
|
|
||||||
Margin="0,0,0,5">
|
Margin="0,0,0,5">
|
||||||
<TextBlock Text="{Binding TopSceneBackgroundMsg}" VerticalAlignment="Center"/>
|
<UniformGrid Rows="2" Margin="3,3,3,3">
|
||||||
<Button Background="{Binding TopSceneBackground}"
|
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
|
||||||
Command="{Binding TopSceneBackground_Command}"
|
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
|
||||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
Margin="0,0,0,5"/>
|
||||||
</UniformGrid>
|
<TextBlock Text="{Binding LanguageAdvertMsg}" TextWrapping="Wrap"
|
||||||
<UniformGrid Columns="2"
|
TextAlignment="Center"/>
|
||||||
Margin="0,0,0,5">
|
</UniformGrid>
|
||||||
<TextBlock Text="{Binding BotSceneBackgroundMsg}" VerticalAlignment="Center"/>
|
</GroupBox>-->
|
||||||
<Button Background="{Binding BotSceneBackground}"
|
<UniformGrid Columns="2"
|
||||||
Command="{Binding BotSceneBackground_Command}"
|
|
||||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
|
||||||
</UniformGrid>
|
|
||||||
<UniformGrid Columns="2"
|
|
||||||
Margin="0,0,0,5">
|
|
||||||
<TextBlock Text="{Binding GridColorMsg}" VerticalAlignment="Center"/>
|
|
||||||
<Button Background="{Binding GridColor}"
|
|
||||||
Command="{Binding GridColor_Command}"
|
|
||||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
|
||||||
</UniformGrid>
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="2*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center"
|
|
||||||
Grid.Row="0" Margin="0,5,0,5"/>
|
|
||||||
<CheckBox IsChecked="{Binding ThickLine}"
|
|
||||||
Grid.Column="1" Grid.Row="0" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
|
||||||
<TextBlock Text="{Binding SmoothTriMeshMsg}" VerticalAlignment="Center"
|
|
||||||
Grid.Row="1" Margin="0,5,0,5"/>
|
|
||||||
<CheckBox IsChecked="{Binding SmoothTriMesh}"
|
|
||||||
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
|
||||||
</Grid>
|
|
||||||
<!--<UniformGrid Columns="2"
|
|
||||||
Margin="0,0,0,5">
|
|
||||||
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedTextFont}" Height="25"
|
|
||||||
Margin="10,5,0,0"/>
|
|
||||||
</UniformGrid>-->
|
|
||||||
<Grid Margin="5,5,5,5">
|
|
||||||
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem Header="{Binding CADMsg}">
|
|
||||||
<StackPanel Margin="5,5,5,0">
|
|
||||||
<!--<UniformGrid Columns="2"
|
|
||||||
Margin="0,0,0,5">
|
|
||||||
<TextBlock Text="{Binding DefMaterialColorMsg}" VerticalAlignment="Center"/>
|
|
||||||
<Button Background="{Binding DefMaterialColor}"
|
|
||||||
Command="{Binding DefMaterialColor_Command}"
|
|
||||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
|
||||||
</UniformGrid>-->
|
|
||||||
<UniformGrid Grid.ColumnSpan="2" Columns="2"
|
|
||||||
Margin="0,0,0,5">
|
|
||||||
<TextBlock Text="{Binding GeometryToleranceMsg}" VerticalAlignment="Center"/>
|
|
||||||
<TextBox Text="{Binding GeometryTolerance}" Height="25"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,0,0,0"/>
|
|
||||||
</UniformGrid>
|
|
||||||
<!--<GroupBox Grid.Column="1" Grid.RowSpan="2"
|
|
||||||
Header="{Binding DimensionMsg}"
|
|
||||||
Margin="0,0,0,5">
|
|
||||||
<UniformGrid Grid.ColumnSpan="2" Columns="2">
|
|
||||||
<TextBlock Text="{Binding ExtLineLenMsg}" VerticalAlignment="Center"/>
|
|
||||||
<TextBox Text="{Binding ExtLineLen}" Height="25"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,5,0,0"/>
|
|
||||||
<TextBlock Text="{Binding ArrowLenMsg}" VerticalAlignment="Center"/>
|
|
||||||
<TextBox Text="{Binding ArrowLen}" Height="25"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,5,0,0"/>
|
|
||||||
<TextBlock Text="{Binding TextDistMsg}" VerticalAlignment="Center"/>
|
|
||||||
<TextBox Text="{Binding TextDist}" Height="25"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,5,0,0"/>
|
|
||||||
<TextBlock Text="{Binding LenIsMMMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedUnitMeasure}" Height="25"
|
|
||||||
Margin="10,5,0,0"/>
|
|
||||||
<TextBlock Text="{Binding DecDigitMsg}" VerticalAlignment="Center"/>
|
|
||||||
<TextBox Text="{Binding DecDigit}" Height="25"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,5,0,0"/>
|
|
||||||
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedFont}" Height="25"
|
|
||||||
Margin="10,5,0,0"/>
|
|
||||||
<TextBlock Text="{Binding TextHeightMsg}" VerticalAlignment="Center"/>
|
|
||||||
<TextBox Text="{Binding TextHeight}" Height="25"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,5,0,0"/>
|
|
||||||
</UniformGrid>
|
|
||||||
</GroupBox>-->
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
</TabItem>
|
|
||||||
<TabItem Header="{Binding ImportMsg}">
|
|
||||||
<StackPanel Margin="5,5,5,0">
|
|
||||||
<Grid Margin="0,5,0,0">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="0.8*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1"
|
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
||||||
Text="{Binding UnitScaleMsg}" />
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="2"
|
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
||||||
Text="{Binding FactorScaleMsg}"/>
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
||||||
Text="{Binding DxfScaleFactorMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
|
||||||
ItemsSource="{Binding ScaleDXFList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedDXFScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
|
||||||
Margin="10,0,0,5"/>
|
|
||||||
<TextBox Grid.Row="1" Grid.Column="2"
|
|
||||||
Text="{Binding DxfScaleFactor}" Height="25"
|
|
||||||
IsEnabled="{Binding DXFScaleEnable, UpdateSourceTrigger=LostFocus}"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,0,0,5"/>
|
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0"
|
|
||||||
Text="{Binding StlScaleFactorMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox Grid.Row="2" Grid.Column="1"
|
|
||||||
ItemsSource="{Binding ScaleSTLList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedSTLScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
|
||||||
Margin="10,0,0,5"/>
|
|
||||||
<TextBox Grid.Row="2" Grid.Column="2"
|
|
||||||
Text="{Binding StlScaleFactor}" Height="25"
|
|
||||||
IsEnabled="{Binding STLScaleEnable, UpdateSourceTrigger=LostFocus}"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,0,0,5"/>
|
|
||||||
<!--<TextBlock Grid.Row="3" Grid.Column="0"
|
|
||||||
Text="{Binding ImageScaleFactorMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox Grid.Row="3" Grid.Column="1"
|
|
||||||
ItemsSource="{Binding ScaleImageList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedImageScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
|
||||||
Margin="10,0,0,5"/>
|
|
||||||
<TextBox Grid.Row="3" Grid.Column="2"
|
|
||||||
Text="{Binding ImageScaleFactor}" Height="25"
|
|
||||||
IsEnabled="{Binding ImageScaleEnable, UpdateSourceTrigger=LostFocus}"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,0,0,5"/>-->
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>
|
|
||||||
<!--<TabItem Header="{Binding ExportMsg}">
|
|
||||||
<StackPanel>
|
|
||||||
<GroupBox Grid.Column="1" Grid.RowSpan="2"
|
|
||||||
Header="{Binding ImageMsg}"
|
|
||||||
Margin="5,5,5,0">
|
|
||||||
<UniformGrid Grid.ColumnSpan="2" Columns="2">
|
|
||||||
<TextBlock Text="{Binding ImageWidthMsg}" VerticalAlignment="Center"/>
|
|
||||||
<TextBox Text="{Binding ImageWidth}" Height="25"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,0,0,5"/>
|
|
||||||
<TextBlock Text="{Binding ImageHeightMsg}" VerticalAlignment="Center"/>
|
|
||||||
<TextBox Text="{Binding ImageHeight}" Height="25"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Margin="10,0,0,5"/>
|
|
||||||
</UniformGrid>
|
|
||||||
</GroupBox>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>-->
|
|
||||||
<TabItem Header="{Binding CAMMsg}">
|
|
||||||
<StackPanel>
|
|
||||||
<!--<GroupBox Grid.Column="1" Grid.RowSpan="2"
|
|
||||||
Header="{Binding MachiningSelGeomMsg}"
|
|
||||||
Margin="5,5,5,0">
|
|
||||||
<UniformGrid Columns="2">
|
|
||||||
<TextBlock Text="{Binding GeomTypeDrillingMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedDrillingGeomType}" Height="25">
|
|
||||||
<ComboBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ComboBox.ItemTemplate>
|
|
||||||
</ComboBox>
|
|
||||||
<TextBlock Text="{Binding GeomTypeSawingMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedSawingGeomType}" Height="25">
|
|
||||||
<ComboBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ComboBox.ItemTemplate>
|
|
||||||
</ComboBox>
|
|
||||||
<TextBlock Text="{Binding GeomTypeMillingMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedMillingGeomType}" Height="25"
|
|
||||||
Margin="0,0,0,5">
|
Margin="0,0,0,5">
|
||||||
<ComboBox.ItemTemplate>
|
<TextBlock Text="{Binding TopSceneBackgroundMsg}" VerticalAlignment="Center"/>
|
||||||
<DataTemplate>
|
<Button Background="{Binding TopSceneBackground}"
|
||||||
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
Command="{Binding TopSceneBackground_Command}"
|
||||||
</DataTemplate>
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
</ComboBox.ItemTemplate>
|
|
||||||
</ComboBox>
|
|
||||||
<TextBlock Text="{Binding GeomTypePocketingMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedPocketingGeomType}" Height="25">
|
|
||||||
<ComboBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ComboBox.ItemTemplate>
|
|
||||||
</ComboBox>
|
|
||||||
<TextBlock Text="{Binding GeomTypeMortisingMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedMortisingGeomType}" Height="25">
|
|
||||||
<ComboBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ComboBox.ItemTemplate>
|
|
||||||
</ComboBox>
|
|
||||||
<TextBlock Text="{Binding GeomTypeChiselingMsg}" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
|
||||||
SelectedItem="{Binding SelectedChiselingGeomType}" Height="25">
|
|
||||||
<ComboBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ComboBox.ItemTemplate>
|
|
||||||
</ComboBox>
|
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</GroupBox>-->
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="{Binding BotSceneBackgroundMsg}" VerticalAlignment="Center"/>
|
||||||
|
<Button Background="{Binding BotSceneBackground}"
|
||||||
|
Command="{Binding BotSceneBackground_Command}"
|
||||||
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="{Binding GridColorMsg}" VerticalAlignment="Center"/>
|
||||||
|
<Button Background="{Binding GridColor}"
|
||||||
|
Command="{Binding GridColor_Command}"
|
||||||
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center"
|
||||||
|
Grid.Row="0" Margin="0,5,0,5"/>
|
||||||
|
<CheckBox IsChecked="{Binding ThickLine}"
|
||||||
|
Grid.Column="1" Grid.Row="0" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Text="{Binding SmoothTriMeshMsg}" VerticalAlignment="Center"
|
||||||
|
Grid.Row="1" Margin="0,5,0,5"/>
|
||||||
|
<CheckBox IsChecked="{Binding SmoothTriMesh}"
|
||||||
|
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
|
||||||
|
</Grid>
|
||||||
|
<!--<UniformGrid Columns="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedTextFont}" Height="25"
|
||||||
|
Margin="10,5,0,0"/>
|
||||||
|
</UniformGrid>-->
|
||||||
|
<Grid Margin="5,5,5,5">
|
||||||
|
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="{Binding CADMsg}">
|
||||||
|
<StackPanel Margin="5,5,5,0">
|
||||||
|
<UniformGrid Grid.ColumnSpan="2" Columns="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="{Binding GeometryToleranceMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding GeometryTolerance}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,0"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<ItemsControl ItemsSource="{Binding LayerColorList}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="{Binding Color_Msg}" VerticalAlignment="Center"/>
|
||||||
|
<Grid Margin="10,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="35"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Background="{Binding Background}"
|
||||||
|
Command="{Binding Color_Command}"
|
||||||
|
Margin="0,0,5,0"
|
||||||
|
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||||
|
<Slider Grid.Column="1"
|
||||||
|
Value="{Binding dAlpha}"
|
||||||
|
Minimum="10"
|
||||||
|
Maximum="100"
|
||||||
|
TickPlacement="BottomRight"
|
||||||
|
TickFrequency="10"
|
||||||
|
IsSnapToTickEnabled="True"
|
||||||
|
Margin="0,0,5,0"/>
|
||||||
|
<TextBlock Grid.Column="2"
|
||||||
|
Text="{Binding sAlpha}"
|
||||||
|
TextAlignment="Right"/>
|
||||||
|
</Grid>
|
||||||
|
</UniformGrid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
<!--<GroupBox Grid.Column="1" Grid.RowSpan="2"
|
||||||
|
Header="{Binding DimensionMsg}"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<UniformGrid Grid.ColumnSpan="2" Columns="2">
|
||||||
|
<TextBlock Text="{Binding ExtLineLenMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding ExtLineLen}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,5,0,0"/>
|
||||||
|
<TextBlock Text="{Binding ArrowLenMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding ArrowLen}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,5,0,0"/>
|
||||||
|
<TextBlock Text="{Binding TextDistMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding TextDist}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,5,0,0"/>
|
||||||
|
<TextBlock Text="{Binding LenIsMMMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedUnitMeasure}" Height="25"
|
||||||
|
Margin="10,5,0,0"/>
|
||||||
|
<TextBlock Text="{Binding DecDigitMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding DecDigit}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,5,0,0"/>
|
||||||
|
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedFont}" Height="25"
|
||||||
|
Margin="10,5,0,0"/>
|
||||||
|
<TextBlock Text="{Binding TextHeightMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding TextHeight}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,5,0,0"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</GroupBox>-->
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<!--<Grid Margin="5,5,5,0">
|
</TabItem>
|
||||||
<Grid.ColumnDefinitions>
|
<TabItem Header="{Binding ImportMsg}">
|
||||||
<ColumnDefinition Width="2*"/>
|
<StackPanel Margin="5,5,5,0">
|
||||||
<ColumnDefinition Width="1*"/>
|
<Grid Margin="0,5,0,0">
|
||||||
</Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<ColumnDefinition Width="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<ColumnDefinition Width="0.8*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
|
<Grid.RowDefinitions>
|
||||||
Grid.Row="0" Margin="0,0,0,5"/>
|
<RowDefinition Height="1*"/>
|
||||||
<CheckBox IsChecked="{Binding NewMachiningIsLastOne}"
|
<RowDefinition Height="1*"/>
|
||||||
Grid.Column="1" Grid.Row="0" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
<RowDefinition Height="1*"/>
|
||||||
<TextBlock Text="{Binding UseDispositionScriptMsg}" VerticalAlignment="Center"
|
<RowDefinition Height="1*"/>
|
||||||
Grid.Row="1" Margin="0,0,0,5"/>
|
</Grid.RowDefinitions>
|
||||||
<CheckBox IsChecked="{Binding UseDispositionScript}"
|
<TextBlock Grid.Row="0" Grid.Column="1"
|
||||||
Grid.Column="1" Grid.Row="1" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||||
</Grid>-->
|
Text="{Binding UnitScaleMsg}" />
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="2"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||||
|
Text="{Binding FactorScaleMsg}"/>
|
||||||
|
|
||||||
<Grid Margin="5,5,5,0">
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||||
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,1"/>
|
Text="{Binding DxfScaleFactorMsg}" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||||
|
ItemsSource="{Binding ScaleDXFList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedDXFScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="2"
|
||||||
|
Text="{Binding DxfScaleFactor}" Height="25"
|
||||||
|
IsEnabled="{Binding DXFScaleEnable, UpdateSourceTrigger=LostFocus}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
||||||
|
Text="{Binding StlScaleFactorMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox Grid.Row="2" Grid.Column="1"
|
||||||
|
ItemsSource="{Binding ScaleSTLList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedSTLScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="2"
|
||||||
|
Text="{Binding StlScaleFactor}" Height="25"
|
||||||
|
IsEnabled="{Binding STLScaleEnable, UpdateSourceTrigger=LostFocus}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<!--<TextBlock Grid.Row="3" Grid.Column="0"
|
||||||
|
Text="{Binding ImageScaleFactorMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox Grid.Row="3" Grid.Column="1"
|
||||||
|
ItemsSource="{Binding ScaleImageList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedImageScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="2"
|
||||||
|
Text="{Binding ImageScaleFactor}" Height="25"
|
||||||
|
IsEnabled="{Binding ImageScaleEnable, UpdateSourceTrigger=LostFocus}"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>-->
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
<!--<TabItem Header="{Binding ExportMsg}">
|
||||||
|
<StackPanel>
|
||||||
|
<GroupBox Grid.Column="1" Grid.RowSpan="2"
|
||||||
|
Header="{Binding ImageMsg}"
|
||||||
|
Margin="5,5,5,0">
|
||||||
|
<UniformGrid Grid.ColumnSpan="2" Columns="2">
|
||||||
|
<TextBlock Text="{Binding ImageWidthMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding ImageWidth}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
<TextBlock Text="{Binding ImageHeightMsg}" VerticalAlignment="Center"/>
|
||||||
|
<TextBox Text="{Binding ImageHeight}" Height="25"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Margin="10,0,0,5"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</GroupBox>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>-->
|
||||||
|
<TabItem Header="{Binding CAMMsg}">
|
||||||
|
<StackPanel>
|
||||||
|
<!--<GroupBox Grid.Column="1" Grid.RowSpan="2"
|
||||||
|
Header="{Binding MachiningSelGeomMsg}"
|
||||||
|
Margin="5,5,5,0">
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding GeomTypeDrillingMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedDrillingGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<TextBlock Text="{Binding GeomTypeSawingMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedSawingGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<TextBlock Text="{Binding GeomTypeMillingMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedMillingGeomType}" Height="25"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<TextBlock Text="{Binding GeomTypePocketingMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedPocketingGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<TextBlock Text="{Binding GeomTypeMortisingMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedMortisingGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<TextBlock Text="{Binding GeomTypeChiselingMsg}" VerticalAlignment="Center"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
|
||||||
|
SelectedItem="{Binding SelectedChiselingGeomType}" Height="25">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
</UniformGrid>
|
||||||
|
</GroupBox>-->
|
||||||
|
|
||||||
<Grid Margin="5,5,5,0">
|
<!--<Grid Margin="5,5,5,0">
|
||||||
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
|
<Grid.ColumnDefinitions>
|
||||||
</Grid>
|
<ColumnDefinition Width="2*"/>
|
||||||
</StackPanel>
|
<ColumnDefinition Width="1*"/>
|
||||||
</TabItem>
|
</Grid.ColumnDefinitions>
|
||||||
</TabControl>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
|
||||||
|
Grid.Row="0" Margin="0,0,0,5"/>
|
||||||
|
<CheckBox IsChecked="{Binding NewMachiningIsLastOne}"
|
||||||
|
Grid.Column="1" Grid.Row="0" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Text="{Binding UseDispositionScriptMsg}" VerticalAlignment="Center"
|
||||||
|
Grid.Row="1" Margin="0,0,0,5"/>
|
||||||
|
<CheckBox IsChecked="{Binding UseDispositionScript}"
|
||||||
|
Grid.Column="1" Grid.Row="1" Margin="4,0,0,0" VerticalAlignment="Center"/>
|
||||||
|
</Grid>-->
|
||||||
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
<Grid Margin="5,5,5,0">
|
||||||
|
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,1"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Margin="5,5,5,0">
|
||||||
|
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<Button Grid.Row="1"
|
||||||
|
Command="{Binding Ok_Command}"
|
||||||
|
IsCancel="True"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
||||||
|
<Image Source="\Resources\Common\Ok.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</EgtWPFLib5:EgtMainWindow>
|
||||||
|
|||||||
@@ -179,12 +179,16 @@ Public Class OptionWindowVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property DefMaterialColor As Brush
|
' lista oggetti che gestiscono colori e trasparenze delle catogorie
|
||||||
|
Private m_LayerColorList As New ObservableCollection(Of LayerColor)({New LayerColor(LayerColor.LayerType.PRINTPART),
|
||||||
|
New LayerColor(LayerColor.LayerType.RIBS),
|
||||||
|
New LayerColor(LayerColor.LayerType.SHELLNUMBERS),
|
||||||
|
New LayerColor(LayerColor.LayerType.AUXSOLIDS),
|
||||||
|
New LayerColor(LayerColor.LayerType.MACHSTART),
|
||||||
|
New LayerColor(LayerColor.LayerType.OTHERS)})
|
||||||
|
Public ReadOnly Property LayerColorList As ObservableCollection(Of LayerColor)
|
||||||
Get
|
Get
|
||||||
Return New SolidColorBrush(Color.FromArgb(CByte(255),
|
Return m_LayerColorList
|
||||||
CByte(OptionModule.m_DefMaterialColor.R),
|
|
||||||
CByte(OptionModule.m_DefMaterialColor.G),
|
|
||||||
CByte(OptionModule.m_DefMaterialColor.B)))
|
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -195,7 +199,7 @@ Public Class OptionWindowVM
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
OptionModule.m_bThickLine = value
|
OptionModule.m_bThickLine = value
|
||||||
WriteMainPrivateProfileString(S_SCENE, K_LINEWIDTH, If(value, "2", "1"))
|
WriteMainPrivateProfileString(S_SCENE, K_LINEWIDTH, If(value, "2", "1"))
|
||||||
EgtSetLineAttribs( If( value, 2, 1))
|
EgtSetLineAttribs(If(value, 2, 1))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -510,11 +514,11 @@ Public Class OptionWindowVM
|
|||||||
'End Property
|
'End Property
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
|
|
||||||
Private m_cmdTopSceneBackground As ICommand
|
Private m_cmdTopSceneBackground As ICommand
|
||||||
Private m_cmdBotSceneBackground As ICommand
|
Private m_cmdBotSceneBackground As ICommand
|
||||||
Private m_cmdGridColor As ICommand
|
Private m_cmdGridColor As ICommand
|
||||||
Private m_cmdUpdateLicenceCmd As ICommand
|
Private m_cmdUpdateLicenceCmd As ICommand
|
||||||
Private m_cmdDefMaterialColor As ICommand
|
|
||||||
Private m_cmdAddMachineCmd As ICommand
|
Private m_cmdAddMachineCmd As ICommand
|
||||||
Private m_cmdExportMachineCmd As ICommand
|
Private m_cmdExportMachineCmd As ICommand
|
||||||
|
|
||||||
@@ -583,11 +587,6 @@ Public Class OptionWindowVM
|
|||||||
Return EgtMsg(6513)
|
Return EgtMsg(6513)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property DefMaterialColorMsg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(6512)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property ImportMsg As String
|
Public ReadOnly Property ImportMsg As String
|
||||||
Get
|
Get
|
||||||
@@ -747,9 +746,35 @@ Public Class OptionWindowVM
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Function WritePrivateProfileColor(IpAppName As String, IpKeyName As String, ByRef Color As Color3d) As Boolean
|
Private Function SelectColor(Col As Color3d, ByRef NewCol As Color3d) As Boolean
|
||||||
Dim sColor As String = Color.R & "," & Color.G & "," & Color.B
|
' Recupero colori custom
|
||||||
Return EgtUILib.WritePrivateProfileString(IpAppName, IpKeyName, sColor, m_sIniFile)
|
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 System.Windows.Forms.ColorDialog
|
||||||
|
ColorDlg.FullOpen = True
|
||||||
|
ColorDlg.CustomColors = nCustomColors.ToArray()
|
||||||
|
ColorDlg.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
|
End Function
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
@@ -854,41 +879,6 @@ Public Class OptionWindowVM
|
|||||||
|
|
||||||
#End Region ' GridColor
|
#End Region ' GridColor
|
||||||
|
|
||||||
#Region "DefMaterialColor"
|
|
||||||
|
|
||||||
'''' <summary>
|
|
||||||
'''' Returns a command that remove the current selected machining.
|
|
||||||
'''' </summary>
|
|
||||||
'Public ReadOnly Property DefMaterialColor_Command() As ICommand
|
|
||||||
' Get
|
|
||||||
' If m_cmdDefMaterialColor Is Nothing Then
|
|
||||||
' m_cmdDefMaterialColor = New Command(AddressOf DefMaterialColorCmd)
|
|
||||||
' End If
|
|
||||||
' Return m_cmdDefMaterialColor
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'''' <summary>
|
|
||||||
'''' Manage the MachiningDb closing. This method is invoked by the CloseMachiningDbCommand.
|
|
||||||
'''' </summary>
|
|
||||||
'Public Sub DefMaterialColorCmd()
|
|
||||||
' ' Recupero colore da Ini
|
|
||||||
' Dim DefColor As New Color3d(192, 192, 192)
|
|
||||||
' GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
|
||||||
' ' Eseguo modifica con dialogo
|
|
||||||
' If SelectColor(DefColor, DefColor) Then
|
|
||||||
' OptionModule.m_DefMaterialColor = DefColor
|
|
||||||
' Map.refSceneHostVM.MainScene.SetDefaultMaterial(OptionModule.m_DefMaterialColor)
|
|
||||||
' WritePrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, OptionModule.m_DefMaterialColor)
|
|
||||||
' EgtDraw()
|
|
||||||
' Map.refManageLayerExpanderVM.UpdateHeaderColor(OptionModule.m_DefMaterialColor)
|
|
||||||
' Map.refManageLayerExpanderVM.LoadObjTree()
|
|
||||||
' NotifyPropertyChanged("DefMaterialColor")
|
|
||||||
' End If
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
#End Region ' DefMaterialColor
|
|
||||||
|
|
||||||
#Region "UpdateLicence"
|
#Region "UpdateLicence"
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@@ -990,16 +980,17 @@ Public Class OptionWindowVM
|
|||||||
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir)
|
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir)
|
||||||
Dim bUpdate As Boolean = True
|
Dim bUpdate As Boolean = True
|
||||||
If bOldExists Then
|
If bOldExists Then
|
||||||
Dim MachBox As New MachineBox( Application.Current.MainWindow, sMachName)
|
Dim MachBox As New UpdateMachineV(Application.Current.MainWindow, New UpdateMachineVM(sMachName))
|
||||||
Select MachBox.ShowDialog()
|
MachBox.ShowDialog()
|
||||||
Case MessageBoxResult.Yes
|
Select Case MachBox.DialogResult
|
||||||
bUpdate = False
|
Case MessageBoxResult.Yes
|
||||||
Case MessageBoxResult.No
|
bUpdate = False
|
||||||
bUpdate = True
|
Case MessageBoxResult.No
|
||||||
Case MessageBoxResult.Cancel
|
bUpdate = True
|
||||||
' Rimuovo il direttorio temporaneo ed esco
|
Case MessageBoxResult.Cancel
|
||||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
' Rimuovo il direttorio temporaneo ed esco
|
||||||
Return
|
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
|
Return
|
||||||
End Select
|
End Select
|
||||||
' Faccio una copia di backup della macchina corrente
|
' Faccio una copia di backup della macchina corrente
|
||||||
Dim sBackupDir As String = sMachDir & ".old"
|
Dim sBackupDir As String = sMachDir & ".old"
|
||||||
@@ -1023,11 +1014,11 @@ Public Class OptionWindowVM
|
|||||||
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
|
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
|
||||||
If bOldExists And bUpdate Then
|
If bOldExists And bUpdate Then
|
||||||
Dim sBackupDir As String = sMachDir & ".old"
|
Dim sBackupDir As String = sMachDir & ".old"
|
||||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Tools") Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Tools") Then
|
||||||
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Tools") Then
|
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Tools") Then
|
||||||
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Tools", sMachDir & "\Tools", True)
|
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Tools", sMachDir & "\Tools", True)
|
||||||
End If
|
End If
|
||||||
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Machinings") Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Machinings") Then
|
||||||
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Machinings") Then
|
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Machinings") Then
|
||||||
@@ -1047,50 +1038,12 @@ Public Class OptionWindowVM
|
|||||||
End If
|
End If
|
||||||
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\SetUp", sMachDir & "\SetUp", True)
|
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\SetUp", sMachDir & "\SetUp", True)
|
||||||
End If
|
End If
|
||||||
'If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Beam") Then
|
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\CustomData") Then
|
||||||
' ' Flag per sovrascrivere vecchio file BeamData.lua con nuovo
|
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\CustomData") Then
|
||||||
' Dim bBeamDataExists As Boolean = False
|
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\CustomData", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||||
' Const sBeamData As String = "\BeamData.lua"
|
End If
|
||||||
' ' Flag per sovrascrivere vecchio file MachiningTypes.ini
|
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\CustomData", sMachDir & "\CustomData", True)
|
||||||
' Dim bMchgTypesExists As Boolean = False
|
End If
|
||||||
' Const sMchgTypes As String = "\MachiningTypes.ini"
|
|
||||||
' If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Beam") Then
|
|
||||||
' If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sBeamData) Then
|
|
||||||
' bBeamDataExists = True
|
|
||||||
' My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sBeamData, sMachDir & sBeamData, True)
|
|
||||||
' End If
|
|
||||||
' If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sMchgTypes) Then
|
|
||||||
' bMchgTypesExists = True
|
|
||||||
' My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sMchgTypes, sMachDir & sMchgTypes, True)
|
|
||||||
' End If
|
|
||||||
' My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Beam", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
|
||||||
' End If
|
|
||||||
' My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Beam", sMachDir & "\Beam", True)
|
|
||||||
' If bBeamDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sBeamData, sMachDir & "\Beam" & sBeamData, True)
|
|
||||||
' If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Beam" & sMchgTypes, True)
|
|
||||||
'End If
|
|
||||||
'If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Wall") Then
|
|
||||||
' ' Flag per sovrascrittura vecchio file WallData.lua con nuovo
|
|
||||||
' Dim bWallDataExists As Boolean = False
|
|
||||||
' Const sWallData As String = "\WallData.lua"
|
|
||||||
' ' Flag per sovrascrivere vecchio file MachiningTypes.ini
|
|
||||||
' Dim bMchgTypesExists As Boolean = False
|
|
||||||
' Const sMchgTypes As String = "\MachiningTypes.ini"
|
|
||||||
' If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Wall") Then
|
|
||||||
' If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sWallData) Then
|
|
||||||
' bWallDataExists = True
|
|
||||||
' My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sWallData, sMachDir & sWallData, True)
|
|
||||||
' End If
|
|
||||||
' If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sMchgTypes) Then
|
|
||||||
' bMchgTypesExists = True
|
|
||||||
' My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sMchgTypes, sMachDir & sMchgTypes, True)
|
|
||||||
' End If
|
|
||||||
' My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Wall", FileIO.DeleteDirectoryOption.DeleteAllContents)
|
|
||||||
' End If
|
|
||||||
' My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Wall", sMachDir & "\Wall", True)
|
|
||||||
' If bWallDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sWallData, sMachDir & "\Wall" & sWallData, True)
|
|
||||||
' If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Wall" & sMchgTypes, True)
|
|
||||||
'End If
|
|
||||||
End If
|
End If
|
||||||
'La macchina "{0}" è stata aggiornata con successo.
|
'La macchina "{0}" è stata aggiornata con successo.
|
||||||
Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
|
Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
|
||||||
@@ -1143,7 +1096,7 @@ Public Class OptionWindowVM
|
|||||||
' aggiungo i file della Macchina
|
' aggiungo i file della Macchina
|
||||||
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
|
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
|
||||||
If Directory.Exists(sMachineDir) Then
|
If Directory.Exists(sMachineDir) Then
|
||||||
zip.AddItem(sMachineDir, sCurrMachineName)
|
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
|
||||||
End If
|
End If
|
||||||
' salvo lo zip
|
' salvo lo zip
|
||||||
zip.Save()
|
zip.Save()
|
||||||
@@ -1165,10 +1118,97 @@ Public Class OptionWindowVM
|
|||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class LayerColor
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Enum LayerType As Integer
|
||||||
|
PRINTPART = 1
|
||||||
|
'REFERENCE = 2
|
||||||
|
MACHSTART = 3
|
||||||
|
RIBS = 4
|
||||||
|
SHELLNUMBERS = 5
|
||||||
|
AUXSOLIDS = 6
|
||||||
|
OTHERS = 7
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_Type As LayerType
|
||||||
|
Public ReadOnly Property c3Color As Color3d
|
||||||
|
Get
|
||||||
|
Select Case m_Type
|
||||||
|
Case LayerType.PRINTPART
|
||||||
|
Return GeomEntityColors.c3Print
|
||||||
|
Case LayerType.RIBS
|
||||||
|
Return GeomEntityColors.c3Rib
|
||||||
|
Case LayerType.SHELLNUMBERS
|
||||||
|
Return GeomEntityColors.c3ShellNumber
|
||||||
|
Case LayerType.AUXSOLIDS
|
||||||
|
Return GeomEntityColors.c3AuxSolids
|
||||||
|
Case LayerType.MACHSTART
|
||||||
|
Return GeomEntityColors.c3MachStart
|
||||||
|
Case LayerType.OTHERS
|
||||||
|
Return GeomEntityColors.c3Others
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Background As Brush
|
||||||
|
Get
|
||||||
|
Return New SolidColorBrush(Color.FromArgb(CByte(255),
|
||||||
|
CByte(c3Color.R),
|
||||||
|
CByte(c3Color.G),
|
||||||
|
CByte(c3Color.B)))
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dAlpha As Double
|
||||||
|
Get
|
||||||
|
Return c3Color.A
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
GeomEntityColors.SetAlpha(m_Type, value)
|
||||||
|
NotifyPropertyChanged(NameOf(sAlpha))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sAlpha As String
|
||||||
|
Get
|
||||||
|
Return c3Color.A & "%"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Color_Msg As String
|
||||||
|
Get
|
||||||
|
Select Case m_Type
|
||||||
|
Case LayerType.PRINTPART
|
||||||
|
Return "Print"
|
||||||
|
Case LayerType.RIBS
|
||||||
|
Return "Ribs"
|
||||||
|
Case LayerType.SHELLNUMBERS
|
||||||
|
Return "Reduce Shell Number"
|
||||||
|
Case LayerType.AUXSOLIDS
|
||||||
|
Return "Filled Solids"
|
||||||
|
Case LayerType.MACHSTART
|
||||||
|
Return "Layer Start"
|
||||||
|
Case LayerType.OTHERS
|
||||||
|
Return "Others"
|
||||||
|
Case Else
|
||||||
|
Return ""
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_cmdColor As ICommand
|
||||||
|
|
||||||
|
Sub New(Type As LayerType)
|
||||||
|
m_Type = Type
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Function SelectColor(Col As Color3d, ByRef NewCol As Color3d) As Boolean
|
Private Function SelectColor(Col As Color3d, ByRef NewCol As Color3d) As Boolean
|
||||||
' Recupero colori custom
|
' Recupero colori custom
|
||||||
Dim sCustomColors As String = ""
|
Dim sCustomColors As String = ""
|
||||||
GetMainPrivateProfileString(S_SCENE, K_CUSTOMCOLORS, "", sCustomColors)
|
GetMainPrivateProfileString(S_COLORS, K_CUSTOMCOLORS, "", sCustomColors)
|
||||||
Dim CustomColors() As String = sCustomColors.Split(","c)
|
Dim CustomColors() As String = sCustomColors.Split(","c)
|
||||||
Dim nCustomColors As New List(Of Integer)
|
Dim nCustomColors As New List(Of Integer)
|
||||||
For Each Color In CustomColors
|
For Each Color In CustomColors
|
||||||
@@ -1192,10 +1232,39 @@ Public Class OptionWindowVM
|
|||||||
sCustomColors &= Color.ToString() & ","
|
sCustomColors &= Color.ToString() & ","
|
||||||
Next
|
Next
|
||||||
sCustomColors = sCustomColors.Trim({" "c, ","c})
|
sCustomColors = sCustomColors.Trim({" "c, ","c})
|
||||||
WriteMainPrivateProfileString(S_SCENE, K_CUSTOMCOLORS, sCustomColors)
|
WriteMainPrivateProfileString(S_COLORS, K_CUSTOMCOLORS, sCustomColors)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
#Region "Color"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that remove the current selected machining.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property Color_Command() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdColor Is Nothing Then
|
||||||
|
m_cmdColor = New Command(AddressOf ColorCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdColor
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Manage the MachiningDb closing. This method is invoked by the CloseMachiningDbCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub ColorCmd()
|
||||||
|
' Recupero colore da Ini
|
||||||
|
Dim c3Print As Color3d = c3Color
|
||||||
|
' Eseguo modifica con dialogo
|
||||||
|
If SelectColor(c3Color, c3Print) Then
|
||||||
|
GeomEntityColors.SetColor(m_Type, c3Print)
|
||||||
|
NotifyPropertyChanged(NameOf(Background))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' PrintPartColor
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
'Public Class GeomTypeConverter
|
'Public Class GeomTypeConverter
|
||||||
|
|||||||
@@ -9,19 +9,23 @@
|
|||||||
<Button Command="{Binding New_Command}"
|
<Button Command="{Binding New_Command}"
|
||||||
ToolTip="{Binding NewToolTip}"
|
ToolTip="{Binding NewToolTip}"
|
||||||
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Margin="0,0,2.5,0"
|
||||||
<Image Source="/Resources/ProjectManager/New.png" Stretch="Uniform"/>
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/New.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding OpenCommand}"
|
<Button Command="{Binding OpenCommand}"
|
||||||
ToolTip="{Binding OpenToolTip}"
|
ToolTip="{Binding OpenToolTip}"
|
||||||
ContextMenuService.Placement="Bottom"
|
ContextMenuService.Placement="Bottom"
|
||||||
Tag="{Binding}"
|
Tag="{Binding}"
|
||||||
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ProjManager_Button}">
|
||||||
<Button.ContextMenu>
|
<Button.ContextMenu>
|
||||||
<ContextMenu ItemsSource="{Binding MruFileNames}">
|
<ContextMenu ItemsSource="{Binding MruFileNames}"
|
||||||
|
Style="{StaticResource Icarus_ContextMenu}">
|
||||||
<ContextMenu.Resources>
|
<ContextMenu.Resources>
|
||||||
<Style TargetType="{x:Type MenuItem}">
|
<Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource Icarus_MenuItem}">
|
||||||
<Setter Property="Command"
|
<Setter Property="Command"
|
||||||
Value="{Binding PlacementTarget.Tag.OpenMruFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}" />
|
Value="{Binding PlacementTarget.Tag.OpenMruFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}" />
|
||||||
<Setter Property="CommandParameter" Value="{Binding}" />
|
<Setter Property="CommandParameter" Value="{Binding}" />
|
||||||
@@ -29,41 +33,58 @@
|
|||||||
</ContextMenu.Resources>
|
</ContextMenu.Resources>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</Button.ContextMenu>
|
</Button.ContextMenu>
|
||||||
<Image Source="/Resources/ProjectManager/Open.png" Stretch="Uniform"/>
|
<Image Source="/Resources/ProjectManager/Open.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding SaveCommand}"
|
<Button Command="{Binding SaveCommand}"
|
||||||
ToolTip="{Binding SaveToolTip}"
|
ToolTip="{Binding SaveToolTip}"
|
||||||
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Margin="2.5,0,2.5,0"
|
||||||
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Save.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding SaveAsCommand}"
|
<Button Command="{Binding SaveAsCommand}"
|
||||||
ToolTip="{Binding SaveAsToolTip}"
|
ToolTip="{Binding SaveAsToolTip}"
|
||||||
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Margin="2.5,0,2.5,0"
|
||||||
<Image Source="/Resources/ProjectManager/SaveAs.png" Stretch="Uniform"/>
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/SaveAs.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding ImportCommand}"
|
<Button Command="{Binding ImportCommand}"
|
||||||
ToolTip="{Binding ImportToolTip}"
|
ToolTip="{Binding ImportToolTip}"
|
||||||
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Margin="2.5,0,2.5,0"
|
||||||
<Image Source="/Resources/ProjectManager/Import.png" Stretch="Uniform"/>
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Import.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding ExportCommand}"
|
||||||
|
ToolTip="{Binding ExportToolTip}"
|
||||||
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Export.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<!--<Button Command="{Binding ExportCommand}" ToolTip="{Binding ExportToolTip}"
|
<!--<Button Command="{Binding ExportCommand}" ToolTip="{Binding ExportToolTip}"
|
||||||
IsEnabled="{Binding DrawIsChecked}">
|
IsEnabled="{Binding DrawIsChecked}">
|
||||||
<Image Source="/Resources/ProjectManager/Export.png" Stretch="Uniform"/>
|
<Image Source="/Resources/ProjectManager/Export.png" Stretch="Uniform"/>
|
||||||
</Button>-->
|
</Button>-->
|
||||||
<Button Command="{Binding OptionsCommand}"
|
<Button Command="{Binding OptionsCommand}"
|
||||||
Width="30"
|
|
||||||
ToolTip="{Binding OptionsToolTip}"
|
ToolTip="{Binding OptionsToolTip}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Margin="2.5,0,2.5,0"
|
||||||
<Image Source="/Resources/ProjectManager/Options.png" Height="22" />
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Options.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding SendFeedbackCommand}"
|
<Button Command="{Binding SendFeedbackCommand}"
|
||||||
Width="30"
|
|
||||||
ToolTip="{Binding SendFeedbackToolTip}"
|
ToolTip="{Binding SendFeedbackToolTip}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Margin="2.5,0,0,0"
|
||||||
<Image Source="/Resources/ProjectManager/Send.png" Height="22" />
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Send.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
Public Class ProjManagerVM
|
Public Class ProjManagerVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
@@ -60,6 +61,7 @@ Public Class ProjManagerVM
|
|||||||
Private m_cmdSave As ICommand
|
Private m_cmdSave As ICommand
|
||||||
Private m_cmdSaveAs As ICommand
|
Private m_cmdSaveAs As ICommand
|
||||||
Private m_cmdImport As ICommand
|
Private m_cmdImport As ICommand
|
||||||
|
Private m_cmdExport As ICommand
|
||||||
Private m_cmdOptions As ICommand
|
Private m_cmdOptions As ICommand
|
||||||
Private m_cmdSendFeedback As ICommand
|
Private m_cmdSendFeedback As ICommand
|
||||||
|
|
||||||
@@ -87,34 +89,24 @@ Public Class ProjManagerVM
|
|||||||
Return EgtMsg(MSG_TOPCOMMANDBAR + 4)
|
Return EgtMsg(MSG_TOPCOMMANDBAR + 4)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property InsertToolTip As String
|
Public ReadOnly Property ImportToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_TOPCOMMANDBAR + 5)
|
Return "Import"
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property ImportBTL_ToolTip As String
|
Public ReadOnly Property ExportToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(61840)
|
Return "Export"
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property UpdateBTL_ToolTip As String
|
Public ReadOnly Property OptionsToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(61834)
|
Return "Options"
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property ExportProject_ToolTip As String
|
Public ReadOnly Property SendFeedbackToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(61838)
|
Return "Send Feedback"
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property ImportProject_ToolTip As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61839)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property GoToProd_ToolTip As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61835)
|
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -162,6 +154,9 @@ Public Class ProjManagerVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub NewProject(bDialog As Boolean)
|
Friend Sub NewProject(bDialog As Boolean)
|
||||||
|
' Gestisco eventuale file corrente modificato
|
||||||
|
If Not Map.refSceneHostVM.MainController.ManageModified() Then Return
|
||||||
|
EgtResetModified()
|
||||||
Dim NewProjMachine As Machine
|
Dim NewProjMachine As Machine
|
||||||
If bDialog AndAlso Map.refMachinePanelVM.MachineList.Count > 0 Then
|
If bDialog AndAlso Map.refMachinePanelVM.MachineList.Count > 0 Then
|
||||||
Dim ChooseMachineWndVM As New ChooseMachineWndVM
|
Dim ChooseMachineWndVM As New ChooseMachineWndVM
|
||||||
@@ -199,24 +194,12 @@ Public Class ProjManagerVM
|
|||||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Friend Sub Open()
|
Friend Sub Open()
|
||||||
OpenProject(Nothing)
|
OpenProject("")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub OpenProject(sFilePath As String)
|
Friend Function OpenProject(sFilePath As String) As Boolean
|
||||||
If String.IsNullOrEmpty(sFilePath) Then
|
Return Map.refSceneHostVM.OpenProject(sFilePath)
|
||||||
' Recupero cartella dell'ultimo progetto aperto
|
End Function
|
||||||
Dim sDir As String = Map.refSceneHostVM.MainController.GetCurrFile()
|
|
||||||
If String.IsNullOrWhiteSpace(sDir) Then
|
|
||||||
GetMainPrivateProfileString(S_MRUFILES, K_FILE & 1, "", sDir)
|
|
||||||
End If
|
|
||||||
If Not String.IsNullOrWhiteSpace(sDir) Then
|
|
||||||
sDir = Path.GetDirectoryName(sDir)
|
|
||||||
End If
|
|
||||||
Map.refSceneHostVM.MainController.OpenProject(sDir)
|
|
||||||
Else
|
|
||||||
Map.refSceneHostVM.MainController.OpenProject(sFilePath, False)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' OpenCommand
|
#End Region ' OpenCommand
|
||||||
|
|
||||||
@@ -265,9 +248,37 @@ Public Class ProjManagerVM
|
|||||||
''' Execute the Save. This method is invoked by the SaveCommand.
|
''' Execute the Save. This method is invoked by the SaveCommand.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub Save()
|
Public Sub Save()
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||||
|
CreateJson()
|
||||||
|
End If
|
||||||
Map.refSceneHostVM.SaveProject()
|
Map.refSceneHostVM.SaveProject()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function CreateJson() As Boolean
|
||||||
|
' creo json
|
||||||
|
Dim LayerList As New List(Of JsonLayer)
|
||||||
|
For Each Layer In Map.refTFSEditorVM.LayerList
|
||||||
|
LayerList.Add(Layer.ConvertToJsonLayer())
|
||||||
|
Next
|
||||||
|
Dim json As String = JsonConvert.SerializeObject(LayerList, Formatting.Indented)
|
||||||
|
Dim sProjName As String = ""
|
||||||
|
EgtGetCurrFilePath(sProjName)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sProjName) Then
|
||||||
|
sProjName = Path.ChangeExtension(sProjName, ".json")
|
||||||
|
If File.Exists(sProjName) Then
|
||||||
|
Try
|
||||||
|
File.Delete(sProjName)
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
File.AppendAllText(sProjName, json)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Json writing error!")
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region ' SaveCommand
|
#End Region ' SaveCommand
|
||||||
|
|
||||||
#Region "SaveAsCommand"
|
#Region "SaveAsCommand"
|
||||||
@@ -316,6 +327,29 @@ Public Class ProjManagerVM
|
|||||||
|
|
||||||
#End Region ' Import
|
#End Region ' Import
|
||||||
|
|
||||||
|
#Region "ExportCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Export.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property ExportCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdExport Is Nothing Then
|
||||||
|
m_cmdExport = New Command(AddressOf Export)
|
||||||
|
End If
|
||||||
|
Return m_cmdExport
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Export. This method is invoked by the ExportCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub Export(ByVal param As Object)
|
||||||
|
Map.refSceneHostVM.ExportProject()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ExportCommand
|
||||||
|
|
||||||
#Region "Options"
|
#Region "Options"
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@@ -380,7 +414,7 @@ Public Class ProjManagerVM
|
|||||||
Map.refSceneHostVM.SaveProject()
|
Map.refSceneHostVM.SaveProject()
|
||||||
End If
|
End If
|
||||||
EgtGetCurrFilePath(sCurrProject)
|
EgtGetCurrFilePath(sCurrProject)
|
||||||
' se modificato, chiedo se si vuole salvare
|
' se modificato, chiedo se si vuole salvare
|
||||||
Else
|
Else
|
||||||
If EgtGetModified() Then
|
If EgtGetModified() Then
|
||||||
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||||
|
|||||||
@@ -1,66 +1,136 @@
|
|||||||
<EgtFloating:EgtFloatingManager x:Class="ProjectV"
|
<DockPanel x:Class="ProjectV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:PrintApp="clr-namespace:Icarus">
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
<DockPanel.Resources>
|
||||||
xmlns:PrintApp="clr-namespace:Icarus">
|
<PrintApp:VisibilityToRowConverter x:Key="VisibilityToRowConverter"/>
|
||||||
|
</DockPanel.Resources>
|
||||||
<Grid DockPanel.Dock="Top" Margin="0,20,0,0">
|
<Grid DockPanel.Dock="Top">
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="0.5*"/>
|
|
||||||
<ColumnDefinition Width="5*"/>
|
|
||||||
<ColumnDefinition Width="0.5*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<PrintApp:TopPanelV Grid.Column="1"
|
<PrintApp:TopPanelV Grid.Column="1"
|
||||||
DataContext="{StaticResource TopPanelVM }"/>
|
DataContext="{StaticResource TopPanelVM }"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid DockPanel.Dock="Bottom">
|
<Grid DockPanel.Dock="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="315"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="315"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="67"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<PrintApp:LayerAdvancementSliderV Grid.Column="2"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
DockPanel.Dock="Bottom"
|
||||||
|
DataContext="{StaticResource SliderManagerVM}"
|
||||||
|
HorizontalAlignment="Stretch"/>
|
||||||
<!--StatusBar -->
|
<!--StatusBar -->
|
||||||
<PrintApp:StatusBarV DataContext="{StaticResource StatusBarVM}"/>
|
<Grid Grid.RowSpan="2"
|
||||||
<PrintApp:MachinePanelV Grid.Column="1"
|
Grid.ColumnSpan="2">
|
||||||
DataContext="{StaticResource MachinePanelVM}"/>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="67"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<PrintApp:MessagePanelV Grid.Row="{Binding DataContext.Message_Visibility, ElementName=ControllerInputPanelV, Converter={StaticResource VisibilityToRowConverter}}"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
DataContext="{StaticResource StatusBarVM}"/>
|
||||||
|
<PrintApp:ControllerInputPanelV x:Name="ControllerInputPanelV" Grid.Row="2"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
DataContext="{StaticResource ControllerInputPanelVM}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!--<PrintApp:ControllerInputPanelV Grid.Row="1"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
DataContext="{StaticResource ControllerInputPanelVM}"/>
|
||||||
|
<PrintApp:MessagePanelV Grid.Row="1"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
DataContext="{StaticResource StatusBarVM}"/>-->
|
||||||
|
<PrintApp:ShowPanelV Grid.Column="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
DataContext="{StaticResource ShowPanelVM}"/>
|
||||||
|
<PrintApp:ViewPanelV Grid.Column="3"
|
||||||
|
Grid.Row="1"
|
||||||
|
DataContext="{StaticResource ViewPanelVM}"/>
|
||||||
|
<PrintApp:InstrumentPanelV Grid.Column="4"
|
||||||
|
Grid.Row="1"
|
||||||
|
DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||||
|
<PrintApp:StatusBarV Grid.Column="6"
|
||||||
|
Grid.Row="1"
|
||||||
|
DataContext="{StaticResource StatusBarVM}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<DockPanel DockPanel.Dock="Bottom"
|
<!--<DockPanel DockPanel.Dock="Bottom"
|
||||||
LastChildFill="False">
|
LastChildFill="False">
|
||||||
<PrintApp:SliceManagerV DockPanel.Dock="Right"
|
|
||||||
DataContext="{StaticResource SliceManagerVM}"
|
|
||||||
Margin="5"/>
|
|
||||||
<PrintApp:LayerAdvancementSliderV DockPanel.Dock="Bottom"
|
<PrintApp:LayerAdvancementSliderV DockPanel.Dock="Bottom"
|
||||||
DataContext="{StaticResource SliderManagerVM}"
|
DataContext="{StaticResource SliderManagerVM}"
|
||||||
HorizontalAlignment="Center"/>
|
HorizontalAlignment="Center"/>
|
||||||
<Grid DockPanel.Dock="Bottom"
|
--><!--<Grid DockPanel.Dock="Bottom"
|
||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
<PrintApp:ControllerInputPanelV Grid.Column="3"
|
<PrintApp:ControllerInputPanelV Grid.Column="3"
|
||||||
DataContext="{StaticResource ControllerInputPanelVM}"
|
DataContext="{StaticResource ControllerInputPanelVM}"
|
||||||
HorizontalAlignment="Center"/>
|
HorizontalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>--><!--
|
||||||
</DockPanel>
|
</DockPanel>-->
|
||||||
|
|
||||||
<PrintApp:ViewLayerManagerV DockPanel.Dock="Bottom"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
DataContext="{StaticResource ViewLayerManagerVM}"/>
|
|
||||||
|
|
||||||
<Grid DockPanel.Dock="Left">
|
<Grid DockPanel.Dock="Left">
|
||||||
<PrintApp:LeftPanelV Grid.Row="1"
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<PrintApp:LeftPanelV Grid.ColumnSpan="2"
|
||||||
DataContext="{StaticResource LeftPanelVM}"
|
DataContext="{StaticResource LeftPanelVM}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Visibility="{Binding DataContext.LeftPanel_Visibility,
|
Visibility="{Binding DataContext.LeftPanel_Visibility,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type PrintApp:ProjectV}}}"/>
|
RelativeSource={RelativeSource AncestorType={x:Type PrintApp:ProjectV}}}"/>
|
||||||
|
<PrintApp:ViewLayerManagerV Grid.Row="1"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
DataContext="{StaticResource ViewLayerManagerVM}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid DockPanel.Dock="Right">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="20*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Grid.ColumnSpan="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Right">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<!--<PrintApp:MachineViewPanelV DataContext="{StaticResource MachineViewPanelVM}"/>-->
|
||||||
|
<PrintApp:LayerIndexSliderV DataContext="{StaticResource SliderManagerVM}"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
HorizontalAlignment="Right"/>
|
||||||
|
<PrintApp:RightPanelV Grid.Column="1"
|
||||||
|
DataContext="{StaticResource RightPanelVM}"/>
|
||||||
|
</Grid>
|
||||||
|
<PrintApp:SliceManagerV Grid.Column="1"
|
||||||
|
Grid.Row="3"
|
||||||
|
DataContext="{StaticResource SliceManagerVM}"
|
||||||
|
HorizontalAlignment="Right"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<PrintApp:RightPanelV DockPanel.Dock="Right"
|
|
||||||
DataContext="{StaticResource RightPanelVM}"/>
|
|
||||||
|
|
||||||
<PrintApp:LayerIndexSliderV DockPanel.Dock="Right"
|
|
||||||
DataContext="{StaticResource SliderManagerVM}"
|
|
||||||
VerticalAlignment="Stretch"/>
|
|
||||||
|
|
||||||
<!-- Grid che occupa lo spazio della scena -->
|
<!-- Grid che occupa lo spazio della scena -->
|
||||||
<Grid Background="Transparent"/>
|
<Grid Background="Transparent"/>
|
||||||
|
|
||||||
</EgtFloating:EgtFloatingManager>
|
</DockPanel>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Imports EgtWPFLib5
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports System.Globalization
|
||||||
|
|
||||||
Public Class ProjectVM
|
Public Class ProjectVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
@@ -28,3 +29,15 @@ Public Class ProjectVM
|
|||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
Public Class VisibilityToRowConverter
|
||||||
|
Implements IValueConverter
|
||||||
|
|
||||||
|
Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||||
|
If IsNothing(value) Then Return 2
|
||||||
|
Return If(value = Visibility.Visible, 1, 2)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||||
|
Throw New System.NotImplementedException()
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<UserControl x:Class="ReferencePanelV"
|
<UserControl x:Class="ReferencePanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
<Border Style="{StaticResource LeftPanelPopup_Border}">
|
xmlns:PrintApp="clr-namespace:Icarus">
|
||||||
|
<Border Padding="2.5"
|
||||||
|
Style="{StaticResource LeftPanel_PopupButton_Border}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
@@ -14,11 +16,13 @@
|
|||||||
Padding="0">
|
Padding="0">
|
||||||
<ListBox.ItemsPanel>
|
<ListBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<UniformGrid Rows="3"/>
|
<UniformGrid Rows="3"
|
||||||
|
Margin="0"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ListBox.ItemsPanel>
|
</ListBox.ItemsPanel>
|
||||||
<ListBox.ItemContainerStyle>
|
<ListBox.ItemContainerStyle>
|
||||||
<Style TargetType="ListBoxItem">
|
<Style TargetType="ListBoxItem">
|
||||||
|
<Setter Property="Margin" Value="0"/>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||||
@@ -30,11 +34,33 @@
|
|||||||
</ListBox.ItemContainerStyle>
|
</ListBox.ItemContainerStyle>
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<RadioButton Content="{Binding sText}"
|
<PrintApp:CheckedImageRadioButton IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
|
||||||
IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
|
ImageSource="{Binding sText}"
|
||||||
FontSize="40"
|
CheckedImageSource="{Binding sSelText}"
|
||||||
GroupName="ReferenceRadio"
|
FontSize="40"
|
||||||
Style="{StaticResource OptionPanel_NestingToggleButton}"/>
|
GroupName="ReferenceRadio"
|
||||||
|
Margin="2.5,2.5,2.5,2.5">
|
||||||
|
<!--<RadioButton.Resources>
|
||||||
|
<DataTemplate x:Key="Normal">
|
||||||
|
<Image Source="{Binding sText}"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate x:Key="Selected">
|
||||||
|
<Image Source="{Binding sSelText}"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</RadioButton.Resources>
|
||||||
|
<RadioButton.Style>
|
||||||
|
<Style TargetType="{x:Type RadioButton}" BasedOn="{StaticResource OptionPanel_NestingToggleButton}">
|
||||||
|
<Setter Property="ContentTemplate" Value="{StaticResource Normal}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="ContentTemplate" Value="{StaticResource Selected}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</RadioButton.Style>-->
|
||||||
|
</PrintApp:CheckedImageRadioButton>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
@@ -42,7 +68,8 @@
|
|||||||
Content="From Import"
|
Content="From Import"
|
||||||
IsChecked="{Binding FromImport_IsChecked}"
|
IsChecked="{Binding FromImport_IsChecked}"
|
||||||
GroupName="ReferenceRadio"
|
GroupName="ReferenceRadio"
|
||||||
|
Margin="2.5"
|
||||||
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ Public Class ReferencePanelVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As ReferenceBtn)
|
Set(value As ReferenceBtn)
|
||||||
m_SelReference = value.Type
|
m_SelReference = value.Type
|
||||||
|
EgtSetInfo(Map.refTopPanelVM.SelPart.nReferenceLayerId, KEY_REFERENCE, value.Type)
|
||||||
UpdateFramePosition()
|
UpdateFramePosition()
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -42,6 +43,7 @@ Public Class ReferencePanelVM
|
|||||||
If value Then
|
If value Then
|
||||||
m_SelReference = ReferenceBtn.References.FROM_IMPORT
|
m_SelReference = ReferenceBtn.References.FROM_IMPORT
|
||||||
NotifyPropertyChanged(NameOf(ghSelReference))
|
NotifyPropertyChanged(NameOf(ghSelReference))
|
||||||
|
EgtSetInfo(Map.refTopPanelVM.SelPart.nReferenceLayerId, KEY_REFERENCE, ReferenceBtn.References.FROM_IMPORT)
|
||||||
UpdateFramePosition()
|
UpdateFramePosition()
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -67,51 +69,65 @@ Public Class ReferencePanelVM
|
|||||||
NotifyPropertyChanged(NameOf(ghSelReference))
|
NotifyPropertyChanged(NameOf(ghSelReference))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub UpdateFramePosition()
|
Friend Sub UpdateFramePosition(Optional SelPart As Print3dPartVM = Nothing)
|
||||||
|
Dim SelReference As Integer = ReferenceBtn.References.BL
|
||||||
|
If IsNothing(SelPart) Then
|
||||||
|
SelPart = Map.refTopPanelVM.SelPart
|
||||||
|
End If
|
||||||
|
EgtGetInfo(SelPart.nReferenceLayerId, KEY_REFERENCE, SelReference)
|
||||||
' elimino precedente
|
' elimino precedente
|
||||||
EgtEmptyGroup(Map.refTopPanelVM.SelPart.nReferenceLayerId)
|
EgtEmptyGroup(SelPart.nReferenceLayerId)
|
||||||
' Creo riferimento
|
' Creo riferimento
|
||||||
Dim frPrintSolid As New Frame3d()
|
Dim frPrintSolid As New Frame3d()
|
||||||
If m_SelReference = ReferenceBtn.References.FROM_IMPORT Then
|
If SelReference = ReferenceBtn.References.FROM_IMPORT Then
|
||||||
EgtGetGlobFrame(Map.refTopPanelVM.SelPart.nPrintSolidId, frPrintSolid)
|
EgtGetGlobFrame(SelPart.nPrintSolidId, frPrintSolid)
|
||||||
frPrintSolid.Setup(New Point3d(frPrintSolid.Orig.x, frPrintSolid.Orig.y, 0))
|
frPrintSolid.Setup(New Point3d(frPrintSolid.Orig.x, frPrintSolid.Orig.y, 0))
|
||||||
Else
|
Else
|
||||||
Dim b3PrintSolid As New BBox3d
|
Dim b3ToBePrintSolid As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(SelPart)
|
||||||
EgtGetBBoxGlob(Map.refTopPanelVM.SelPart.nPrintSolidId, GDB_BB.STANDARD, b3PrintSolid)
|
|
||||||
' Creo riferimento
|
' Creo riferimento
|
||||||
Dim ptOrig As New Point3d(b3PrintSolid.Min())
|
Dim ptOrig As New Point3d(b3ToBePrintSolid.Min())
|
||||||
Select Case m_SelReference
|
Select Case SelReference
|
||||||
Case ReferenceBtn.References.TL
|
Case ReferenceBtn.References.TL
|
||||||
ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX
|
ptOrig += b3ToBePrintSolid.DimY() * Vector3d.Y_AX
|
||||||
Case ReferenceBtn.References.TR
|
Case ReferenceBtn.References.TR
|
||||||
ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX + b3PrintSolid.DimX() * Vector3d.X_AX
|
ptOrig += b3ToBePrintSolid.DimY() * Vector3d.Y_AX + b3ToBePrintSolid.DimX() * Vector3d.X_AX
|
||||||
Case ReferenceBtn.References.BL
|
Case ReferenceBtn.References.BL
|
||||||
Case ReferenceBtn.References.BR
|
Case ReferenceBtn.References.BR
|
||||||
ptOrig += b3PrintSolid.DimX() * Vector3d.X_AX
|
ptOrig += b3ToBePrintSolid.DimX() * Vector3d.X_AX
|
||||||
Case ReferenceBtn.References.TC
|
Case ReferenceBtn.References.TC
|
||||||
ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX + b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
ptOrig += b3ToBePrintSolid.DimY() * Vector3d.Y_AX + b3ToBePrintSolid.DimX() / 2 * Vector3d.X_AX
|
||||||
Case ReferenceBtn.References.ML
|
Case ReferenceBtn.References.ML
|
||||||
ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX
|
ptOrig += b3ToBePrintSolid.DimY() / 2 * Vector3d.Y_AX
|
||||||
Case ReferenceBtn.References.MR
|
Case ReferenceBtn.References.MR
|
||||||
ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX + b3PrintSolid.DimX() * Vector3d.X_AX
|
ptOrig += b3ToBePrintSolid.DimY() / 2 * Vector3d.Y_AX + b3ToBePrintSolid.DimX() * Vector3d.X_AX
|
||||||
Case ReferenceBtn.References.TC
|
Case ReferenceBtn.References.TC
|
||||||
ptOrig += b3PrintSolid.DimY() * Vector3d.Y_AX + b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
ptOrig += b3ToBePrintSolid.DimY() * Vector3d.Y_AX + b3ToBePrintSolid.DimX() / 2 * Vector3d.X_AX
|
||||||
Case ReferenceBtn.References.MR
|
Case ReferenceBtn.References.MR
|
||||||
ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX + b3PrintSolid.DimX() * Vector3d.X_AX
|
ptOrig += b3ToBePrintSolid.DimY() / 2 * Vector3d.Y_AX + b3ToBePrintSolid.DimX() * Vector3d.X_AX
|
||||||
Case ReferenceBtn.References.BC
|
Case ReferenceBtn.References.BC
|
||||||
ptOrig += b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
ptOrig += b3ToBePrintSolid.DimX() / 2 * Vector3d.X_AX
|
||||||
Case ReferenceBtn.References.MC
|
Case ReferenceBtn.References.MC
|
||||||
ptOrig += b3PrintSolid.DimY() / 2 * Vector3d.Y_AX + b3PrintSolid.DimX() / 2 * Vector3d.X_AX
|
ptOrig += b3ToBePrintSolid.DimY() / 2 * Vector3d.Y_AX + b3ToBePrintSolid.DimX() / 2 * Vector3d.X_AX
|
||||||
End Select
|
End Select
|
||||||
|
Dim vtMovedPart As Vector3d
|
||||||
|
If EgtGetInfo(SelPart.nPartId, KEY_MOVEDPART, vtMovedPart) Then
|
||||||
|
ptOrig = ptOrig - vtMovedPart
|
||||||
|
ElseIf EgtGetInfo(SelPart.nPartId, KEY_MOVEDPART2, vtMovedPart) Then
|
||||||
|
ptOrig = ptOrig - vtMovedPart
|
||||||
|
End If
|
||||||
|
Dim nPartFrameId As Integer = EgtCreateGeoFrame(SelPart.nPartReferenceLayerId, New Frame3d(ptOrig), GDB_RT.GLOB)
|
||||||
|
EgtSetStatus(nPartFrameId, GDB_ST.OFF)
|
||||||
|
' elimino componente Z
|
||||||
|
ptOrig = ptOrig + New Vector3d(0, 0, -ptOrig.z)
|
||||||
frPrintSolid = New Frame3d(ptOrig)
|
frPrintSolid = New Frame3d(ptOrig)
|
||||||
End If
|
End If
|
||||||
Dim nFrameId As Integer = EgtCreateGeoFrame(Map.refTopPanelVM.SelPart.nReferenceLayerId, frPrintSolid, GDB_RT.GLOB)
|
Dim nFrameId As Integer = EgtCreateGeoFrame(SelPart.nReferenceLayerId, frPrintSolid, GDB_RT.GLOB)
|
||||||
If nFrameId Then
|
If nFrameId Then
|
||||||
EgtSetName(nFrameId, FRAME_PART)
|
EgtSetName(nFrameId, FRAME_PART)
|
||||||
EgtSetMode(nFrameId, GDB_MD.LOCKED)
|
EgtSetMode(nFrameId, GDB_MD.LOCKED)
|
||||||
Map.refTopPanelVM.SelPart.UpdateReferenceId(nFrameId)
|
SelPart.UpdateReferenceId(nFrameId)
|
||||||
End If
|
End If
|
||||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nReferenceLayerId, KEY_REFERENCE, m_SelReference)
|
Map.refDispositionPanelVM.RefreshPos()
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -174,25 +190,52 @@ Public Class ReferenceBtn
|
|||||||
Get
|
Get
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case References.TL
|
Case References.TL
|
||||||
Return "┌"
|
Return "/Resources/ReferencePanel/TL.png" '"┌"
|
||||||
Case References.TR
|
Case References.TR
|
||||||
Return "┐"
|
Return "/Resources/ReferencePanel/TR.png" '"┐"
|
||||||
Case References.BL
|
Case References.BL
|
||||||
Return "└"
|
Return "/Resources/ReferencePanel/BL.png" '"└"
|
||||||
Case References.BR
|
Case References.BR
|
||||||
Return "┘"
|
Return "/Resources/ReferencePanel/BR.png" '"┘"
|
||||||
Case References.TC
|
Case References.TC
|
||||||
Return "┬"
|
Return "/Resources/ReferencePanel/TC.png" '"┬"
|
||||||
Case References.ML
|
Case References.ML
|
||||||
Return "├"
|
Return "/Resources/ReferencePanel/ML.png" '"├"
|
||||||
Case References.MR
|
Case References.MR
|
||||||
Return "┤"
|
Return "/Resources/ReferencePanel/MR.png" '"┤"
|
||||||
Case References.BC
|
Case References.BC
|
||||||
Return "┴"
|
Return "/Resources/ReferencePanel/BC.png" '"┴"
|
||||||
Case References.MC
|
Case References.MC
|
||||||
Return "┼"
|
Return "/Resources/ReferencePanel/MC.png" '"┼"
|
||||||
Case Else
|
Case Else
|
||||||
Return "X"
|
Return "" '"X"
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sSelText As String
|
||||||
|
Get
|
||||||
|
Select Case Type
|
||||||
|
Case References.TL
|
||||||
|
Return "/Resources/ReferencePanel/White_TL.png" '"┌"
|
||||||
|
Case References.TR
|
||||||
|
Return "/Resources/ReferencePanel/White_TR.png" '"┐"
|
||||||
|
Case References.BL
|
||||||
|
Return "/Resources/ReferencePanel/White_BL.png" '"└"
|
||||||
|
Case References.BR
|
||||||
|
Return "/Resources/ReferencePanel/White_BR.png" '"┘"
|
||||||
|
Case References.TC
|
||||||
|
Return "/Resources/ReferencePanel/White_TC.png" '"┬"
|
||||||
|
Case References.ML
|
||||||
|
Return "/Resources/ReferencePanel/White_ML.png" '"├"
|
||||||
|
Case References.MR
|
||||||
|
Return "/Resources/ReferencePanel/White_MR.png" '"┤"
|
||||||
|
Case References.BC
|
||||||
|
Return "/Resources/ReferencePanel/White_BC.png" '"┴"
|
||||||
|
Case References.MC
|
||||||
|
Return "/Resources/ReferencePanel/White_MC.png" '"┼"
|
||||||
|
Case Else
|
||||||
|
Return "" '"X"
|
||||||
End Select
|
End Select
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|||||||
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 947 B |
|
Before Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 691 B |
|
Before Width: | Height: | Size: 812 B |
|
Before Width: | Height: | Size: 757 B |
|
Before Width: | Height: | Size: 792 B |
|
After Width: | Height: | Size: 266 B |
|
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 |
|
Before Width: | Height: | Size: 434 B |