Compare commits
272 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e1e9eab39 | |||
| 4a42bd3067 | |||
| fbfaad64cf | |||
| 33b09fdc4d | |||
| 4407d36165 | |||
| 15ceb6159f | |||
| 6070516cd5 | |||
| efd2d5d8c9 | |||
| da178396f5 | |||
| 5e824bf894 | |||
| 0b24324001 | |||
| c827a89d94 | |||
| 9518fe951b | |||
| 0d81ee5974 | |||
| dca88a1aae | |||
| c433e5b5bd | |||
| 07da0b55d4 | |||
| 5c1df0c8d2 | |||
| 7e323827de | |||
| ee57c64e91 | |||
| 391fa8dbb5 | |||
| 0bcd67a402 | |||
| 1ca8c76bbf | |||
| f752dc46c3 | |||
| ee69bda3a5 | |||
| dd939a7fb6 | |||
| e01ee20b48 | |||
| aeeaf624ee | |||
| d01225cd6e | |||
| 5792664da8 | |||
| caff5e5507 | |||
| 6224b1e40b | |||
| aca43262cf | |||
| 6f526dca45 | |||
| b3a359e257 | |||
| dc787f2596 | |||
| d0cb48b31d | |||
| c9b4d679bd | |||
| e726416853 | |||
| 9be2a9d1c3 | |||
| aed8483ede | |||
| 349a1429c1 | |||
| 29c528fa0e | |||
| 0fa0d4e612 | |||
| 600da701b1 | |||
| c534b459ae | |||
| 86e6a21d63 | |||
| d7522c4eb8 | |||
| 1f7a918ac2 | |||
| e4a87dc475 | |||
| 7a26984f95 | |||
| 3a76d6c91a | |||
| 4d691cee62 | |||
| ce3ff4e3d6 | |||
| 3d1d62398a | |||
| 91f86f8682 | |||
| 7d457be9c5 | |||
| 3e097b81a6 | |||
| 155d9615b0 | |||
| 2864f6fd16 | |||
| 19eb5b2110 | |||
| b171f05956 | |||
| 14bf3ae7e2 | |||
| 8df9640d96 | |||
| 9f7b62502c | |||
| 8e9a3cdb73 | |||
| f47c365db2 | |||
| ccdb690225 | |||
| 7ac6fb42c6 | |||
| 1ddb8a27fb | |||
| 41ca5127c6 | |||
| 860823c929 | |||
| 9cd0b4aefa | |||
| 6fc916051c | |||
| 8df36d2768 | |||
| 997ca13934 | |||
| 9b6761af37 | |||
| 732c05fd9c | |||
| 71372bf51a | |||
| a63089a0c8 | |||
| 5d6c666128 | |||
| 30cc0e29e4 | |||
| 882f7ba82f | |||
| 1bf0979c94 | |||
| f5bb24a4db | |||
| 470a88bd95 | |||
| b63a7f3046 | |||
| 7bc6619e92 | |||
| a39cfeb4dd | |||
| 3a71247913 | |||
| 422538b5fe | |||
| ab32986539 | |||
| 9eb196b942 | |||
| ab87952edb | |||
| b59fe318cf | |||
| 83c63bd583 | |||
| cca2a923ee | |||
| a6e9747da8 | |||
| 65f8d69361 | |||
| f3b7f4fd04 | |||
| 2d77634314 | |||
| bd79698a6e | |||
| efe5199258 | |||
| 3171b3d6ea | |||
| 9eb75eb8f9 | |||
| edcbec6597 | |||
| d083b465fd | |||
| 5327830ea7 | |||
| c06eddcd12 | |||
| 83388c0b97 | |||
| 72a6ca774e | |||
| f7f321fba7 | |||
| eba9686148 | |||
| 41f5b6ba70 | |||
| 66685b7e4f | |||
| fd6da1f694 | |||
| e91b0e3087 | |||
| ee85507b11 | |||
| f9c184a81c | |||
| 1fb59b293f | |||
| 3d93d98603 | |||
| 1ea76d1caa | |||
| 4bea9d2483 | |||
| eaf4a836fa | |||
| a5b9957c76 | |||
| b8b92e637c | |||
| 83b1b5b531 | |||
| 6545afb831 | |||
| c530f172bb | |||
| 98dcbc65e7 | |||
| bc92139a3d | |||
| a88c804370 | |||
| ce21ef3a71 | |||
| 15021a7d0f | |||
| 7c21db7055 | |||
| 4c142df7ef | |||
| 72f41bacab | |||
| b91dc8972d | |||
| c01972f99e | |||
| 5fe6b03a89 | |||
| be30ebadbf | |||
| e67cf50f50 | |||
| f82a6495bd | |||
| 9168da183e | |||
| c6262613c8 | |||
| 31edd150bd | |||
| 9fdd7b4b77 | |||
| 0ed3efed11 | |||
| b0bae3af98 | |||
| 235ec10a2d | |||
| 66061ad262 | |||
| 3e99eb1a8f | |||
| 753ff7b4f1 | |||
| 1edfe486cb | |||
| 7190993f11 | |||
| 249289144f | |||
| 36ee5e4352 | |||
| 147099b702 | |||
| dd81384bb8 | |||
| 9cf61d691d | |||
| 358c5df390 | |||
| ccaec9af5a | |||
| 1dbecd0083 | |||
| 11c6f95378 | |||
| 3604a85cc1 | |||
| 3aaaa0fcb6 | |||
| 52da2bc2c9 | |||
| 4de476907f | |||
| 07bcb7479b | |||
| 92818aafd4 | |||
| f4326b27b7 | |||
| 1f4a0afd75 | |||
| 565ba3c756 | |||
| 7ab4e56594 | |||
| 697fb4c730 | |||
| 4f5804206d | |||
| 58828cf846 | |||
| 36138ec459 | |||
| 7fc49b0d1d | |||
| cf9379272c | |||
| cd6714752e | |||
| 4c62410c20 | |||
| b017fef2b9 | |||
| 17785afc20 | |||
| 62953c981e | |||
| c3a3057420 | |||
| 8fa7b6188c | |||
| f3770dfc7c | |||
| 1358cef04a | |||
| e0fe4d9444 | |||
| 05186db728 | |||
| 5b21559e56 | |||
| 13a774429e | |||
| bde6c38733 | |||
| e3beaf2aa3 | |||
| deb8b34402 | |||
| 49311579ec | |||
| 589b7211ab | |||
| 892806d32a | |||
| 914a89014e | |||
| 3043a717d3 | |||
| 8a3b52e082 | |||
| f4126dba7a | |||
| 6009db35cd | |||
| 4a42374891 | |||
| 64c6a6cf9b | |||
| d1a8f033db | |||
| a6be019b32 | |||
| c343b18571 | |||
| f2a777a226 | |||
| 2e0979a618 | |||
| bd33450bb0 | |||
| fa0ebe1503 | |||
| d33a976d3b | |||
| ebe0c84e1f | |||
| 090e930a0f | |||
| f319409261 | |||
| ad7634f52d | |||
| c95fb50006 | |||
| a788f207af | |||
| f4a8edd421 | |||
| 601f66187a | |||
| a92822bb87 | |||
| 1a9045a23f | |||
| fb0d35eddf | |||
| c367f1bfe9 | |||
| d789be4547 | |||
| 20e1e9b41c | |||
| b25f065f3c | |||
| 83cf2646cf | |||
| 11bc92bb10 | |||
| 953083e429 | |||
| 132990d705 | |||
| 0477c42208 | |||
| c11925e90f | |||
| d745119195 | |||
| aa283fd190 | |||
| 243125cbb4 | |||
| 2789051005 | |||
| 0b13379731 | |||
| 6cc7ba8ccd | |||
| 36674aeb65 | |||
| 9aa9b51710 | |||
| 15b87d7911 | |||
| c8bf133113 | |||
| faba640eee | |||
| e9ff1c198b | |||
| abc304e25c | |||
| 80f4dc6b83 | |||
| 8f5ef91890 | |||
| 2cef4e6fd8 | |||
| f2fce7a653 | |||
| 7581ae0bdb | |||
| 661ae9f09c | |||
| 44d411819f | |||
| 46134c10b6 | |||
| 36b7ae4843 | |||
| 63b4977c39 | |||
| ae927719c6 | |||
| 8944a8d191 | |||
| 5cdfc79aca | |||
| 2f24604fa8 | |||
| 2889e30386 | |||
| a9458620c1 | |||
| 7fe03cbbb4 | |||
| d0646eb922 | |||
| 83f37dc628 | |||
| 568d7c109d | |||
| 1c36907b47 | |||
| d2e45a937e | |||
| 13f9fc9bd2 | |||
| 614756e1bb |
@@ -108,6 +108,8 @@ Public Class CompoListPageVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If m_SideAngle_IsChecked OrElse m_Drip_IsChecked Then Return
|
||||
CompoWindowMap.refCompoSceneHostV.m_SelListHole.Clear()
|
||||
CompoWindowMap.refCompoSceneHostV.m_DeselectListHole.Clear()
|
||||
m_FiloTop_IsChecked = value
|
||||
If value Then
|
||||
' Se non ci sono loop interni, imposto quello esterno
|
||||
@@ -122,6 +124,7 @@ Public Class CompoListPageVM
|
||||
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
|
||||
m_CompoListVisibility = Visibility.Collapsed
|
||||
m_CompoBackVisibility = Visibility.Collapsed
|
||||
CompoWindowMap.refCompoSceneHostV.SetRefSideEntityControlVM(m_SideEntityControlVM)
|
||||
Else
|
||||
m_SideEntityControlVM.Close()
|
||||
m_SideEntityControlVM = Nothing
|
||||
|
||||
@@ -3,60 +3,60 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
DockPanel.Dock="Bottom">
|
||||
|
||||
<Grid Visibility="{Binding Top_Visibility}"
|
||||
|
||||
<Grid Visibility="{Binding Top_Visibility}"
|
||||
Margin="0,0,0,5">
|
||||
|
||||
<TextBlock Text="{Binding TopMsg}"/>
|
||||
<CheckBox IsChecked="{Binding TopIsChecked}"
|
||||
<TextBlock Text="{Binding TopMsg}" Foreground="{DynamicResource Omag_White}"/>
|
||||
<CheckBox IsChecked="{Binding TopIsChecked}"
|
||||
HorizontalAlignment="Right" Margin="6,0,6,0"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Button Content="{Binding TrfDataMsg}"
|
||||
<Button Content="{Binding TrfDataMsg}"
|
||||
Command="{Binding TrfData_Command}"
|
||||
Visibility="{Binding TrfData_Visibility}"
|
||||
Margin="0,0,0,5"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
|
||||
<Button Content="{Binding CsvDataMsg}"
|
||||
<Button Content="{Binding CsvDataMsg}"
|
||||
Command="{Binding CsvData_Command}"
|
||||
Visibility="{Binding CsvData_Visibility}"
|
||||
Margin="0,0,0,5"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
|
||||
<Grid Visibility="{Binding PartName_Visibility}"
|
||||
<Grid Visibility="{Binding PartName_Visibility}"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding PartNameMsg}" Grid.Column="0"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding PartName}" Grid.Column="1" Width="130"/>
|
||||
<TextBlock Text="{Binding PartNameMsg}" Grid.Column="0" Foreground="{DynamicResource Omag_White}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding PartName}" Grid.Column="1" Width="130"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid Visibility="{Binding PartNum_Visibility}"
|
||||
<Grid Visibility="{Binding PartNum_Visibility}"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding PartNumMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding PartNum}" Grid.Column="1" Width="60"/>
|
||||
<TextBlock Text="{Binding PartNumMsg}" Foreground="{DynamicResource Omag_White}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding PartNum}" Grid.Column="1" Width="60"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<UniformGrid Columns="2"
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5"
|
||||
Visibility="{Binding OkExit_Visibility}">
|
||||
<Button Content="{Binding OkMsg}"
|
||||
<Button Content="{Binding OkMsg}"
|
||||
Command="{Binding OkCommand}"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
<Button Content="{Binding ExitMsg}" IsCancel="True"
|
||||
<Button Content="{Binding ExitMsg}" IsCancel="True"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
|
||||
<DockPanel>
|
||||
<DockPanel>
|
||||
|
||||
<UniformGrid Columns="3"
|
||||
DockPanel.Dock="Top"
|
||||
Visibility="{Binding SideEntity_Visibility}"
|
||||
Margin="0,0,0,0">
|
||||
|
||||
|
||||
<!--Inclina lati-->
|
||||
<ToggleButton
|
||||
IsChecked="{Binding SideAngle_IsChecked}"
|
||||
@@ -21,9 +21,9 @@
|
||||
<AccessText TextWrapping="Wrap" Text="{Binding SideAngleMsg}"/>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
|
||||
<!--FiloTop--><!--
|
||||
<ToggleButton Padding="0"
|
||||
|
||||
<!--FiloTop-->
|
||||
<!--<ToggleButton Padding="0"
|
||||
IsChecked="{Binding FiloTop_IsChecked}"
|
||||
Style="{StaticResource CompoWindow_ToggleButton}"
|
||||
Margin="0,0,1.75,0"
|
||||
@@ -32,7 +32,7 @@
|
||||
<AccessText TextWrapping="Wrap" Text="{Binding FiloTopMsg}"/>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>-->
|
||||
|
||||
|
||||
<!--Incidi-->
|
||||
<ToggleButton Padding="0"
|
||||
IsChecked="{Binding Engrave_IsChecked}"
|
||||
@@ -50,100 +50,100 @@
|
||||
Margin="1.75,0,0,0"
|
||||
IsEnabled="{Binding Drip_IsEnabled}">
|
||||
<ToggleButton.Content>
|
||||
<AccessText TextWrapping="Wrap" Text="{Binding DripMsg}" />
|
||||
<AccessText TextWrapping="Wrap" Text="{Binding DripMsg}" />
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<StackPanel DockPanel.Dock="Bottom">
|
||||
|
||||
<ContentControl Content="{Binding CompoManagerControl,
|
||||
<StackPanel DockPanel.Dock="Bottom">
|
||||
|
||||
<ContentControl Content="{Binding CompoManagerControl,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding CompoManagerControl_Visibility}"/>
|
||||
|
||||
<Button Command="{Binding BackCommand}"
|
||||
|
||||
<Button Command="{Binding BackCommand}"
|
||||
Visibility="{Binding Back_Visibility}"
|
||||
Style="{StaticResource CompoWindow_Button}"
|
||||
Focusable="False"
|
||||
Margin="0,0,0,5">
|
||||
<Image Source="/Resources/MachiningTab/BackArrow.png"/>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
<Image Source="/Resources/MachiningTab/BackArrow.png"/>
|
||||
</Button>
|
||||
|
||||
<Grid>
|
||||
|
||||
<ContentControl VerticalAlignment="Center"
|
||||
</StackPanel>
|
||||
|
||||
<Grid>
|
||||
|
||||
<ContentControl VerticalAlignment="Center"
|
||||
Content="{Binding SideEntityControl}"/>
|
||||
|
||||
<StackPanel VerticalAlignment="Center"
|
||||
|
||||
<StackPanel VerticalAlignment="Center"
|
||||
Visibility="{Binding Measure_Visibility}">
|
||||
<ItemsControl ItemsSource="{Binding CompoParamList}">
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type OmagOFFICE:TextParamItem}">
|
||||
<Grid Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Name}" VerticalAlignment="Center"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
<ItemsControl ItemsSource="{Binding CompoParamList}">
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type OmagOFFICE:TextParamItem}">
|
||||
<Grid Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Name}" VerticalAlignment="Center" Foreground="{DynamicResource Omag_White}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Value}" IsEnabled="{Binding IsEnable}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OmagOFFICE:CheckParamItem}">
|
||||
<Grid Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
<CheckBox Grid.Column="1"
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OmagOFFICE:CheckParamItem}">
|
||||
<Grid Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Name}" Foreground="{DynamicResource Omag_White}"/>
|
||||
<CheckBox Grid.Column="1"
|
||||
IsChecked="{Binding Value}" IsEnabled="{Binding IsEnable}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
|
||||
</ItemsControl>
|
||||
</ItemsControl>
|
||||
|
||||
<TextBlock Text="{Binding OutputMessage}"
|
||||
<TextBlock Text="{Binding OutputMessage}"
|
||||
Foreground="{Binding MsgColor}"
|
||||
TextWrapping="Wrap"
|
||||
TextAlignment="Justify"
|
||||
Margin="0,0,0,5"/>
|
||||
|
||||
<Button Content="{Binding InternalMsg}"
|
||||
|
||||
<Button Content="{Binding InternalMsg}"
|
||||
Command="{Binding InternalCommand}"
|
||||
Visibility="{Binding Internal_Visibility}"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
|
||||
<Button Content="{Binding AlzAndFrontMsg}"
|
||||
|
||||
<Button Content="{Binding AlzAndFrontMsg}"
|
||||
Command="{Binding AlzAndFrontCommand}"
|
||||
Visibility="{Binding AlzAndFront_Visibility}"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
|
||||
<UniformGrid Columns="2"
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5"
|
||||
Visibility="{Binding AddRemove_Visibility}">
|
||||
<Button Content="{Binding AddMsg}"
|
||||
<Button Content="{Binding AddMsg}"
|
||||
Command="{Binding AddCommand}"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
<Button Content="{Binding CancelMsg}"
|
||||
<Button Content="{Binding CancelMsg}"
|
||||
Command="{Binding CancelCommand}"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -67,8 +67,6 @@ Public Class CompoParamPageVM
|
||||
Private m_AlzAndFront_Visibility As Visibility
|
||||
Public Property AlzAndFront_Visibility As Visibility
|
||||
Get
|
||||
'' !!!! Temporaneamente in attesa di completamento Frontalini e alzatine !!!!
|
||||
'Return Visibility.Collapsed
|
||||
Return m_AlzAndFront_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
@@ -750,6 +748,50 @@ Public Class CompoParamPageVM
|
||||
NotifyPropertyChanged("MsgColor")
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateInLoopReference(nCmp As Integer)
|
||||
' aggiorno il layer "FiloTop"
|
||||
Dim nIdInLoop As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "InLoop")
|
||||
While nIdInLoop <> GDB_ID.NULL
|
||||
Dim nCmpInfoIL As Integer = 0
|
||||
If EgtGetInfo(nIdInLoop, "ID", nCmpInfoIL) AndAlso nCmp = nCmpInfoIL Then
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nIdInLoop, "FiloTopRef", nLayFiloTop)
|
||||
If nLayFiloTop <> GDB_ID.NULL Then
|
||||
Dim LocalList As New List(Of Integer) From {nIdInLoop}
|
||||
If IsNothing(m_SideEntityControlVM) Then
|
||||
m_SideEntityControlVM = New SideEntityControlVM(SideEntityControlVM.CallingWindowOpt.COMPO,
|
||||
CompoWindowMap.refCompoSceneHostV.CompoScene,
|
||||
SideEntityControlVM.ModeOpt.FILOTOP)
|
||||
m_SideEntityControlVM.CreateFiloTopPreView(LocalList)
|
||||
Else
|
||||
m_SideEntityControlVM.CreateFiloTopPreView(LocalList)
|
||||
End If
|
||||
EgtSetStatus(nLayFiloTop, GDB_ST.ON_)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nIdInLoop = EgtGetNextName(nIdInLoop, "InLoop")
|
||||
End While
|
||||
End Sub
|
||||
|
||||
' riceve la info "ID" della componente
|
||||
Public Sub SetStatusVisibilityInLoopReference(nCmp As Integer, Status As GDB_ST)
|
||||
' aggiorno il layer "FiloTop"
|
||||
Dim nIdInLoop As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "InLoop")
|
||||
While nIdInLoop <> GDB_ID.NULL
|
||||
Dim nCmpInfoIL As Integer = 0
|
||||
If EgtGetInfo(nIdInLoop, "ID", nCmpInfoIL) AndAlso nCmp = nCmpInfoIL Then
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nIdInLoop, "FiloTopRef", nLayFiloTop)
|
||||
If nLayFiloTop <> GDB_ID.NULL Then
|
||||
EgtSetStatus(nLayFiloTop, Status)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nIdInLoop = EgtGetNextName(nIdInLoop, "InLoop")
|
||||
End While
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -867,6 +909,7 @@ Public Class CompoParamPageVM
|
||||
Dim nCmpInfo As Integer = 0
|
||||
If EgtGetInfo(nId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
UpdateInLoopReference(nCmp)
|
||||
Exit While
|
||||
End If
|
||||
nId = EgtGetNextName(nId, "HoleLabels")
|
||||
|
||||
@@ -3,6 +3,11 @@ Imports EgtWPFLib5
|
||||
|
||||
Public Class CompoSceneHostV
|
||||
|
||||
Public m_SelListHole As New List(Of Integer)
|
||||
Public m_DeselectListHole As New List(Of Integer)
|
||||
|
||||
Private m_refSideEntityControlVM As SideEntityControlVM
|
||||
|
||||
Private m_SelFromScene As Boolean = False
|
||||
Friend ReadOnly Property SelFromScene As Boolean
|
||||
Get
|
||||
@@ -36,6 +41,10 @@ Public Class CompoSceneHostV
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Public Sub SetRefSideEntityControlVM(refSideEntityControl As SideEntityControlVM)
|
||||
m_refSideEntityControlVM = refSideEntityControl
|
||||
End Sub
|
||||
|
||||
Private Sub PreInitializeScene()
|
||||
' imposto colore di default
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
@@ -156,6 +165,8 @@ Public Class CompoSceneHostV
|
||||
Dim nCmpInfo As Integer = 0
|
||||
If EgtGetInfo(nHLId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
||||
EgtSetStatus(nHLId, GDB_ST.ON_)
|
||||
' nascondo eventuali FiloTop
|
||||
CompoWindowMap.refCompoParamPageVM.SetStatusVisibilityInLoopReference(nCmp, GDB_ST.OFF)
|
||||
Exit While
|
||||
End If
|
||||
nHLId = EgtGetNextName(nHLId, "HoleLabels")
|
||||
@@ -262,6 +273,8 @@ Public Class CompoSceneHostV
|
||||
EgtRemoveInfo(nLayId, INFO_DEPTH)
|
||||
EgtResetColor(nLayId)
|
||||
End If
|
||||
m_DeselectListHole.Add(nLayId)
|
||||
m_SelListHole.Remove(nLayId)
|
||||
Else
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
@@ -272,12 +285,18 @@ Public Class CompoSceneHostV
|
||||
EgtSetInfo(nLayId, INFO_DEPTH, SideAngleEntity.m_Parameter2)
|
||||
EgtSetColor(nLayId, New Color3d(255, 255, 255))
|
||||
End If
|
||||
m_SelListHole.Add(nLayId)
|
||||
m_DeselectListHole.Remove(nLayId)
|
||||
End If
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
If Not IsNothing(m_refSideEntityControlVM) Then
|
||||
m_refSideEntityControlVM.CreateFiloTopPreView(m_SelListHole)
|
||||
m_refSideEntityControlVM.EraseFiloTopPreview(m_DeselectListHole)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
@@ -146,7 +146,7 @@ Public Class CompoWindowVM
|
||||
|
||||
Friend Function MakePreview(ByRef sMsg As String) As Boolean
|
||||
If Not EgtLuaExecLine(LUA_CMP_DRAW & "(true)") Then
|
||||
sMsg = "Error in component execution"
|
||||
sMsg = EgtMsg(91689) ' Error in component execution
|
||||
m_bDrawOk = False
|
||||
Else
|
||||
EgtLuaGetGlobStringVar(LUA_CMP_VARS & ".MSG", sMsg)
|
||||
@@ -364,6 +364,9 @@ Public Class CompoWindowVM
|
||||
' Cancello layer regioni per selezione buchi
|
||||
Pz = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||
|
||||
' identificativo univoico del gruppo di pezzi, se più di un pezzo
|
||||
Dim sGUICode As String = String.Empty
|
||||
|
||||
While Pz <> -1
|
||||
' imposto il contesto corrente
|
||||
EgtSetCurrentContext(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx())
|
||||
@@ -513,6 +516,9 @@ Public Class CompoWindowVM
|
||||
EgtEraseEmptyParts()
|
||||
' Area dei nuovi pezzi
|
||||
Dim dNewArea As Double = 0
|
||||
If nNbr > 1 Then
|
||||
sGUICode = System.Guid.NewGuid.ToString
|
||||
End If
|
||||
' Se esiste il file del pezzo
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
' eseguo inserimento
|
||||
@@ -527,8 +533,15 @@ Public Class CompoWindowVM
|
||||
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", CompoWindowMap.refCompoManagerVM.sTrfOrderCode & "-" & nId2.ToString())
|
||||
' Aggiorno l'area dei nuovi pezzi
|
||||
dNewArea += GeomCalc.GetPartArea(nId2)
|
||||
' Inserisco in parcheggio
|
||||
|
||||
' assegno l'identificatico del pezzo, se esiste
|
||||
If Not String.IsNullOrEmpty(sGUICode) Then
|
||||
Dim sPreGuid As String = EstCalc.CreatePreGuidCode(nId2)
|
||||
EgtSetInfo(nId2, INFO_REFGROUP, sPreGuid & sGUICode)
|
||||
End If
|
||||
' muovo il pezzo nella prima posizione di parcheggio libera
|
||||
EstCalc.StoreOnePart(nId2, True)
|
||||
|
||||
' Aggiungo riferimento e lo inserisco in VeinMatching
|
||||
VeinMatching.SetRefOnPart(nId2)
|
||||
VeinMatching.AddPart(nId2, True)
|
||||
|
||||
@@ -21,6 +21,7 @@ Module ConstGen
|
||||
' File con dati di licenza
|
||||
Public Const LIC_FILE_NAME As String = "OmagOFFICE.lic"
|
||||
Public Const S_LICENCE As String = "Licence"
|
||||
Public Const K_LOCKID As String = "LockId"
|
||||
Public Const K_KEY As String = "Key"
|
||||
Public Const K_NESTKEY As String = "NestKey"
|
||||
|
||||
@@ -76,5 +77,7 @@ Module ConstGen
|
||||
Public Const SETUP_LUA As String = "SetUp.lua"
|
||||
' Sottodirettorio per BackUp
|
||||
Public Const BACKUP_DIR As String = "BackUp"
|
||||
' Info per rotazione in registrazione grezzo
|
||||
Public Const INFO_REGROT As String = "RegRot"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -18,6 +18,7 @@ Module ConstIni
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_USERLEVEL As String = "UserLevel"
|
||||
Public Const K_MAXINST As String = "MaxInstances"
|
||||
Public Const K_INSTANCES As String = "Instances"
|
||||
@@ -36,6 +37,7 @@ Module ConstIni
|
||||
Public Const K_CONTOURFROMCAMERA As String = "ContourFromCamera"
|
||||
Public Const K_SUPPORT As String = "Support"
|
||||
Public Const K_PHOTODIR As String = "PhotoDir"
|
||||
Public Const K_SHOWNBARROW As String = "ShowNbArrow"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -95,6 +97,7 @@ Module ConstIni
|
||||
|
||||
Public Const S_SIDES As String = "Sides"
|
||||
Public Const K_MAXSIDEANGLE As String = "MaxSideAngle"
|
||||
Public Const K_SIZEALWAYSONTOP As String = "SizeAlwaysOnTop"
|
||||
Public Const K_PARSIDE_AS_TRF As String = "ParSideAsTrf"
|
||||
Public Const K_SIDEANGLE As String = "SideAngle"
|
||||
Public Const K_DELTA_ANG_TG As String = "DeltaAngTg"
|
||||
@@ -103,6 +106,8 @@ Module ConstIni
|
||||
Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2"
|
||||
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
||||
Public Const K_ENGRAVESHORT As String = "EngraveShort"
|
||||
Public Const K_ENGRAVEANGLE As String = "EngraveAngle"
|
||||
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
|
||||
Public Const K_DRIPOFFSET As String = "DripOffset"
|
||||
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
||||
Public Const K_DRIPDEPTH As String = "DripDepth"
|
||||
@@ -110,6 +115,8 @@ Module ConstIni
|
||||
Public Const K_UNDERDRILLDEPTH As String = "UnderDrillDepth"
|
||||
Public Const K_FILOTOPOFFSET As String = "FiloTopOffset"
|
||||
Public Const K_FILOTOPDEPTH As String = "FiloTopDepth"
|
||||
Public Const K_FILOTOPROUNDOFF As String = "FiloTopRoundOff"
|
||||
Public Const K_TEXTCOLORENT As String = "TextColorEnt"
|
||||
|
||||
Public Const S_NEST As String = "Nest"
|
||||
Public Const K_DIRECT As String = "Direct"
|
||||
@@ -121,7 +128,8 @@ Module ConstIni
|
||||
Public Const K_TEXTCOLOR As String = "TextColor"
|
||||
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
||||
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
||||
Public Const K_DRAGRETTANGLE As String = "DragRettangle"
|
||||
Public Const K_DRAGRECTANGLE As String = "DragRectangle"
|
||||
Public Const K_STARTENDMODIFYONINTCORNER As String = "StartEndModifyOnIntCorner"
|
||||
|
||||
Public Const S_SPLIT As String = "Split"
|
||||
Public Const K_MOVE_LEV As String = "MoveLevel"
|
||||
@@ -133,6 +141,7 @@ Module ConstIni
|
||||
Public Const K_CSVCURRDIR As String = "CurrDir"
|
||||
Public Const K_CSVLASTFILE As String = "LastFile"
|
||||
Public Const K_THICKTOLERANCE As String = "ThickTolerance"
|
||||
Public Const K_FULL As String = "Full"
|
||||
|
||||
Public Const S_COLORTOSIDEANG As String = "ColorToSideAng"
|
||||
Public Const K_CTSA_ENABLE As String = "Enable"
|
||||
|
||||
|
After Width: | Height: | Size: 857 B |
@@ -10,103 +10,115 @@
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
MinWidth="270" MinHeight="250"
|
||||
MaxWidth="500"
|
||||
ResizeMode="NoResize">
|
||||
|
||||
<DockPanel Margin="5,5,5,0">
|
||||
<DockPanel Margin="5,5,5,0" Background="{StaticResource Omag_DarkGray}">
|
||||
|
||||
<TextBlock Text="{Binding CsvPath}"
|
||||
DockPanel.Dock="Top"
|
||||
Margin="0,0,0,5"/>
|
||||
|
||||
<UniformGrid Columns="2"
|
||||
DockPanel.Dock="Bottom"
|
||||
|
||||
<UniformGrid Columns="15"
|
||||
DockPanel.Dock="Top"
|
||||
Margin="0,0,0,5">
|
||||
<Button Content="{Binding InsertMsg}"
|
||||
<Button Command="{Binding NewCommand}"
|
||||
Margin="0,0,2.5,0"
|
||||
Style = "{DynamicResource CSV_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Reset.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding OpenCommand}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style = "{DynamicResource CSV_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<ToggleButton IsChecked="{Binding Plus_IsChecked}"
|
||||
Style="{DynamicResource CSV_ToggleButton}"
|
||||
Margin="2.5,0,2.5,0">
|
||||
<Image Source="/Resources/CsvWindow/CsvPlus - Color.png"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton IsChecked="{Binding Minus_IsChecked}"
|
||||
Style="{DynamicResource CSV_ToggleButton}"
|
||||
Margin="2.5,0,0,0">
|
||||
<Image Source="/Resources/CsvWindow/CsvMinus - Color.png"/>
|
||||
</ToggleButton>
|
||||
|
||||
<Button ToolTip="{Binding InsertMsg}"
|
||||
Command="{Binding InsertCommand}"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
<Button Content="{Binding RemoveMsg}"
|
||||
Style = "{DynamicResource CSV_Button}">
|
||||
<Image Source="/Resources/CsvWindow/Inserisci-pezzo CSV.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding RemoveMsg}"
|
||||
Command="{Binding RemoveCommand}"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
</UniformGrid>
|
||||
Style = "{DynamicResource CSV_Button}">
|
||||
<Image Source="/Resources/CsvWindow/Parcheggia-pezzo CSV.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="4"
|
||||
DockPanel.Dock="Bottom"
|
||||
Margin="0,0,0,5">
|
||||
<Button Command="{Binding NewCommand}"
|
||||
Margin="0,0,2.5,0">
|
||||
<Image Source="/Resources/CsvWindow/CsvNew.png"/>
|
||||
</Button>
|
||||
<Button Command="{Binding OpenCommand}"
|
||||
Margin="2.5,0,2.5,0">
|
||||
<Image Source="/Resources/CsvWindow/CsvOpen.png"/>
|
||||
</Button>
|
||||
<ToggleButton IsChecked="{Binding Plus_IsChecked}"
|
||||
Margin="2.5,0,2.5,0">
|
||||
<Image Source="/Resources/CsvWindow/CsvPlus.png"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton IsChecked="{Binding Minus_IsChecked}"
|
||||
Margin="2.5,0,0,0">
|
||||
<Image Source="/Resources/CsvWindow/CsvMinus.png"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<TreeView ItemsSource="{Binding CsvTypeList}"
|
||||
<TextBlock Text="{Binding CsvPath}"
|
||||
DockPanel.Dock="Top"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
Margin="0,0,0,5"/>
|
||||
|
||||
<TreeView ItemsSource="{Binding CsvTypeList}"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Margin="0,0,0,5" >
|
||||
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<EventSetter Event="MouseUp" Handler="PartTypeClick"/>
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<EventSetter Event="MouseUp" Handler="PartTypeClick"/>
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type OmagOFFICE:CsvPartType}"
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type OmagOFFICE:CsvPartType}"
|
||||
ItemsSource="{Binding CsvPartList}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" Foreground="{StaticResource Omag_White}"/>
|
||||
|
||||
</Grid>
|
||||
<HierarchicalDataTemplate.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<EventSetter Event="MouseUp" Handler="PartItemClick"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_Gray}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</HierarchicalDataTemplate.ItemContainerStyle>
|
||||
</Grid>
|
||||
<HierarchicalDataTemplate.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<EventSetter Event="MouseUp" Handler="PartItemClick"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="true">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_Gray}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</HierarchicalDataTemplate.ItemContainerStyle>
|
||||
|
||||
</HierarchicalDataTemplate>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type OmagOFFICE:CsvPartItem}">
|
||||
<Grid Width="246" Margin="0,5,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DataTemplate DataType="{x:Type OmagOFFICE:CsvPartItem}">
|
||||
<Grid Width="246" Margin="0,5,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
|
||||
</TreeView>
|
||||
</TreeView>
|
||||
|
||||
</DockPanel>
|
||||
</DockPanel>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -110,6 +111,8 @@ Public Class CsvWindowVM
|
||||
#Region "METHODS"
|
||||
|
||||
Private Sub ShowTreeView()
|
||||
Dim bFull = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.CSV_AUTO) And
|
||||
(GetMainPrivateProfileInt(S_CSV, K_FULL, 1) <> 0)
|
||||
' Path del file Csv
|
||||
Dim TempPath As New Text.StringBuilder(260)
|
||||
PathCompactPathEx(TempPath, CsvM.CsvPath, 56, 0)
|
||||
@@ -118,6 +121,7 @@ Public Class CsvWindowVM
|
||||
m_CsvTypeList.Clear()
|
||||
Dim sCurrMat As String = String.Empty
|
||||
Dim dCurrTh As Double = 0
|
||||
Dim sCurrPath As String = String.Empty
|
||||
Dim nCatToNest As Integer = 0
|
||||
Dim nCatCount As Integer = 0
|
||||
Dim PartCathegory As New CsvPartType("", 0)
|
||||
@@ -128,15 +132,29 @@ Public Class CsvWindowVM
|
||||
If i = 1 Then
|
||||
sCurrMat = CurrPart.m_sMaterial
|
||||
dCurrTh = CurrPart.m_dTh
|
||||
sCurrPath = CurrPart.m_sPath
|
||||
ElseIf String.Compare(sCurrMat, CurrPart.m_sMaterial, True) <> 0 Or
|
||||
String.Compare(sCurrPath, CurrPart.m_sPath, True) <> 0 Or
|
||||
Math.Abs(dCurrTh - CurrPart.m_dTh) > 10 * EPS_SMALL Then
|
||||
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
|
||||
If bFull Then
|
||||
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
Else
|
||||
PartCathegory.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
End If
|
||||
PartCathegory.IsExpanded = True
|
||||
CsvTypeList.Add(PartCathegory)
|
||||
sCurrMat = CurrPart.m_sMaterial
|
||||
dCurrTh = CurrPart.m_dTh
|
||||
sCurrPath = CurrPart.m_sPath
|
||||
PartCathegory = New CsvPartType("", 0)
|
||||
nCatToNest = 0
|
||||
nCatCount = 0
|
||||
@@ -150,18 +168,31 @@ Public Class CsvWindowVM
|
||||
PartCathegory.CsvPartList.Add(New CsvPartItem(CurrPart.m_sName, i, sCount, sDim, CurrPart.m_bActive))
|
||||
Next
|
||||
' Inserisco ultima categoria
|
||||
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If bFull Then
|
||||
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
Else
|
||||
PartCathegory.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
End If
|
||||
PartCathegory.IsExpanded = True
|
||||
CsvTypeList.Add(PartCathegory)
|
||||
NotifyPropertyChanged("CsvTypeList")
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateTreeView()
|
||||
Dim bFull = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.CSV_AUTO) And
|
||||
(GetMainPrivateProfileInt(S_CSV, K_FULL, 1) <> 0)
|
||||
For Each CatItem As CsvPartType In m_CsvTypeList
|
||||
Dim sCurrMat As String = String.Empty
|
||||
Dim dCurrTh As Double = 0
|
||||
Dim sCurrPath As String = String.Empty
|
||||
Dim nCatToNest As Integer = 0
|
||||
Dim nCatCount As Integer = 0
|
||||
For Each PrtItem As CsvPartItem In CatItem.CsvPartList
|
||||
@@ -171,12 +202,23 @@ Public Class CsvWindowVM
|
||||
PrtItem.sText1 = sCount
|
||||
sCurrMat = PartData.m_sMaterial
|
||||
dCurrTh = PartData.m_dTh
|
||||
sCurrPath = PartData.m_sPath
|
||||
nCatToNest += PartData.m_nToNest
|
||||
nCatCount += PartData.m_nCount + PartData.m_nAdd
|
||||
Next
|
||||
CatItem.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If bFull Then
|
||||
CatItem.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
CatItem.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
Else
|
||||
CatItem.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
CatItem.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -6,19 +6,21 @@
|
||||
IsResizable="False"
|
||||
IsMinimizable="False"
|
||||
IsClosable="False"
|
||||
ShowInTaskbar="False"
|
||||
ShowInTaskbar="False"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Width="270" ResizeMode="NoResize" SizeToContent="Height">
|
||||
|
||||
<StackPanel Margin="5,5,5,0">
|
||||
<!--TAGLIO-->
|
||||
<TextBlock Text="{Binding CurrSawingMsg}"
|
||||
Visibility="{Binding CurrSawing_Visibility}"
|
||||
Style="{StaticResource RawTextBlock}"
|
||||
Margin="0,0,0,5"/>
|
||||
<ComboBox ItemsSource="{Binding CurrSawingList}"
|
||||
SelectedItem="{Binding SelCurrSawing}"
|
||||
Visibility="{Binding CurrSawing_Visibility}"
|
||||
Style="{DynamicResource Raw_ComboBox}"
|
||||
Margin="0,0,0,5"/>
|
||||
|
||||
<!--<TextBlock Text="{Binding AuxMachTypeMsg}"
|
||||
@@ -33,30 +35,37 @@
|
||||
<!--FORATURA-->
|
||||
<TextBlock Text="{Binding CurrDrillingMsg}"
|
||||
Visibility="{Binding CurrDrilling_Visibility}"
|
||||
Style="{StaticResource RawTextBlock}"
|
||||
Margin="0,0,0,5"/>
|
||||
<ComboBox ItemsSource="{Binding CurrDrillingList}"
|
||||
SelectedItem="{Binding SelCurrDrilling}"
|
||||
Visibility="{Binding CurrDrilling_Visibility}"
|
||||
Style="{DynamicResource Raw_ComboBox}"
|
||||
Margin="0,0,0,5"/>
|
||||
<!--FRESATURA-->
|
||||
<TextBlock Text="{Binding CurrMillingMsg}"
|
||||
Visibility="{Binding CurrMilling_Visibility}"
|
||||
Style="{StaticResource RawTextBlock}"
|
||||
Margin="0,0,0,5"/>
|
||||
<ComboBox ItemsSource="{Binding CurrMillingList}"
|
||||
SelectedItem="{Binding SelCurrMilling}"
|
||||
Visibility="{Binding CurrMilling_Visibility}"
|
||||
Style="{DynamicResource Raw_ComboBox}"
|
||||
Margin="0,0,0,5"/>
|
||||
<!--SVUOTATURA-->
|
||||
<TextBlock Text="{Binding CurrPocketingMsg}"
|
||||
Visibility="{Binding CurrPocketing_Visibility}"
|
||||
Style="{StaticResource RawTextBlock}"
|
||||
Margin="0,0,0,5"/>
|
||||
<ComboBox ItemsSource="{Binding CurrPocketingList}"
|
||||
SelectedItem="{Binding SelCurrPocketing}"
|
||||
Visibility="{Binding CurrPocketing_Visibility}"
|
||||
Style="{DynamicResource Raw_ComboBox}"
|
||||
Margin="0,0,0,5"/>
|
||||
<!--WATERJET-->
|
||||
<TextBlock Text="{Binding CurrWaterjettingMsg}"
|
||||
Visibility="{Binding CurrWaterjetting_Visibility}"
|
||||
Style="{StaticResource RawTextBlock}"
|
||||
Margin="0,0,0,5"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -66,12 +75,14 @@
|
||||
<ComboBox ItemsSource="{Binding CurrWaterjettingList}"
|
||||
SelectedItem="{Binding SelCurrWaterjetting}"
|
||||
Visibility="{Binding CurrWaterjetting_Visibility}"
|
||||
Style="{DynamicResource Raw_ComboBox}"
|
||||
Margin="0,0,5,5"/>
|
||||
|
||||
<!--Quality-->
|
||||
<ComboBox ItemsSource="{Binding CurrWaterjettingQualityList}"
|
||||
SelectedItem="{Binding SelCurrWaterjettingQuality}"
|
||||
Visibility="{Binding CurrWaterjettingQuality_Visibility}"
|
||||
Visibility="{Binding CurrWaterjetting_Visibility}"
|
||||
Style="{DynamicResource Raw_ComboBox}"
|
||||
Margin="5,0,0,5"
|
||||
Grid.Column="1">
|
||||
</ComboBox>
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
Me.DataContext = CurrMachWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_CurrMachWindowVM = CurrMachWindowVM
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Me_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.ActualHeight / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.ActualWidth / 2
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
|
||||
@@ -29,9 +29,17 @@ Public Class CurrMachWindowVM
|
||||
m_SelCurrSawing = value
|
||||
End If
|
||||
CurrentMachine.sCurrSawing = m_SelCurrSawing
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING_OFFICE, m_SelCurrSawing, sMachIniFile)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrSawing(sCurrOfficeSawing As String)
|
||||
m_SelCurrSawing = sCurrOfficeSawing
|
||||
CurrentMachine.sCurrSawing = m_SelCurrSawing
|
||||
NotifyPropertyChanged("SelCurrSawing")
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property CurrSawing_Visibility As Visibility
|
||||
Get
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
@@ -149,10 +157,18 @@ Public Class CurrMachWindowVM
|
||||
If value <> m_SelCurrDrilling Then
|
||||
m_SelCurrDrilling = value
|
||||
CurrentMachine.sCurrDrilling = m_SelCurrDrilling
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRDRILLING_OFFICE, m_SelCurrDrilling, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrDrilling(sCurrOfficeDrilling As String)
|
||||
m_SelCurrDrilling = sCurrOfficeDrilling
|
||||
CurrentMachine.sCurrDrilling = m_SelCurrDrilling
|
||||
NotifyPropertyChanged("SelCurrDrilling")
|
||||
End Sub
|
||||
|
||||
Private m_CurrDrilling_Visibility As Visibility
|
||||
Public Property CurrDrilling_Visibility As Visibility
|
||||
Get
|
||||
@@ -187,10 +203,18 @@ Public Class CurrMachWindowVM
|
||||
If value <> m_SelCurrMilling Then
|
||||
m_SelCurrMilling = value
|
||||
CurrentMachine.sCurrMilling = m_SelCurrMilling
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRMILLING_OFFICE, m_SelCurrMilling, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrMilling(sCurrOfficeMilling As String)
|
||||
m_SelCurrMilling = sCurrOfficeMilling
|
||||
CurrentMachine.sCurrMilling = m_SelCurrMilling
|
||||
NotifyPropertyChanged("SelCurrMilling")
|
||||
End Sub
|
||||
|
||||
Private m_CurrMilling_Visibility As Visibility
|
||||
Public Property CurrMilling_Visibility As Visibility
|
||||
Get
|
||||
@@ -225,10 +249,18 @@ Public Class CurrMachWindowVM
|
||||
If value <> m_SelCurrPocketing Then
|
||||
m_SelCurrPocketing = value
|
||||
CurrentMachine.sCurrPocketing = m_SelCurrPocketing
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRPOCKETING_OFFICE, m_SelCurrPocketing, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrPocketing(sCurrOfficePocketing As String)
|
||||
m_SelCurrPocketing = sCurrOfficePocketing
|
||||
CurrentMachine.sCurrPocketing = m_SelCurrPocketing
|
||||
NotifyPropertyChanged("SelCurrPocketing")
|
||||
End Sub
|
||||
|
||||
Private m_CurrPocketing_Visibility As Visibility
|
||||
Public Property CurrPocketing_Visibility As Visibility
|
||||
Get
|
||||
@@ -263,10 +295,18 @@ Public Class CurrMachWindowVM
|
||||
If value <> m_SelCurrWaterjetting Then
|
||||
m_SelCurrWaterjetting = value
|
||||
CurrentMachine.sCurrWaterJetting = m_SelCurrWaterjetting
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING_OFFICE, m_SelCurrWaterjetting, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetCurrWaterjetting(sCurrOfficeWaterjetting As String)
|
||||
m_SelCurrWaterjetting = sCurrOfficeWaterjetting
|
||||
CurrentMachine.sCurrWaterJetting = m_SelCurrWaterjetting
|
||||
NotifyPropertyChanged("SelCurrWaterjetting")
|
||||
End Sub
|
||||
|
||||
Private m_CurrWaterjettingQualityList As New List(Of String)
|
||||
Public Property CurrWaterjettingQualityList As List(Of String)
|
||||
Get
|
||||
@@ -286,11 +326,19 @@ Public Class CurrMachWindowVM
|
||||
If value <> m_SelCurrWaterjettingQuality Then
|
||||
m_SelCurrWaterjettingQuality = value
|
||||
CurrentMachine.sCurrWaterJettingQuality = m_SelCurrWaterjettingQuality
|
||||
' salvo la lvorazione corrente
|
||||
WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY_OFFICE, m_SelCurrWaterjettingQuality, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CurrWaterjetting_Visibility As Visibility
|
||||
Public Sub SetCurrWaterjettingQuality(sCurrOfficeWaterjettingQuality As String)
|
||||
m_SelCurrWaterjettingQuality = sCurrOfficeWaterjettingQuality
|
||||
CurrentMachine.sCurrWaterJettingQuality = m_SelCurrWaterjettingQuality
|
||||
NotifyPropertyChanged("SelCurrWaterjetting")
|
||||
End Sub
|
||||
|
||||
Private m_CurrWaterjetting_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property CurrWaterjetting_Visibility As Visibility
|
||||
Get
|
||||
Return m_CurrWaterjetting_Visibility
|
||||
@@ -408,28 +456,28 @@ Public Class CurrMachWindowVM
|
||||
' --- DRILL ---
|
||||
CreateMachiningList(MCH_MY.DRILLING, m_AvailableDrillList, m_CurrDrillingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_CurrDrillingList.Count = 0 Then
|
||||
If m_CurrDrillingList.Count <= 1 Then
|
||||
CurrentMachine.sCurrDrilling = String.Empty
|
||||
End If
|
||||
|
||||
' --- MILL ---
|
||||
CreateMachiningList(MCH_MY.MILLING, m_AvailableMillList, m_CurrMillingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_CurrMillingList.Count = 0 Then
|
||||
If m_CurrMillingList.Count <= 1 Then
|
||||
CurrentMachine.sCurrMilling = String.Empty
|
||||
End If
|
||||
|
||||
' --- SCASSO ---
|
||||
CreateMachiningList(MCH_MY.POCKETING, m_AvailableMillList, m_CurrPocketingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_CurrPocketingList.Count = 0 Then
|
||||
If m_CurrPocketingList.Count <= 1 Then
|
||||
CurrentMachine.sCurrPocketing = String.Empty
|
||||
End If
|
||||
|
||||
' --- WATERJET ---
|
||||
CreateMachiningList(MCH_MY.WATERJETTING, m_AvailableWaterjetList, m_CurrWaterjettingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_CurrWaterjettingList.Count = 0 Then
|
||||
If m_CurrWaterjettingList.Count <= 1 Then
|
||||
CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
m_CurrWaterjettingQualityList = New List(Of String)(CurrentMachine.Qualities)
|
||||
@@ -439,28 +487,28 @@ Public Class CurrMachWindowVM
|
||||
' --- DRILL ---
|
||||
CreateMachiningList(MCH_MY.DRILLING, m_AvailableDrillList, m_CurrDrillingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_CurrDrillingList.Count = 0 Then
|
||||
If m_CurrDrillingList.Count <= 1 Then
|
||||
CurrentMachine.sCurrDrilling = String.Empty
|
||||
End If
|
||||
|
||||
' --- MILL ---
|
||||
CreateMachiningList(MCH_MY.MILLING, m_AvailableMillList, m_CurrMillingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_CurrMillingList.Count = 0 Then
|
||||
If m_CurrMillingList.Count <= 1 Then
|
||||
CurrentMachine.sCurrMilling = String.Empty
|
||||
End If
|
||||
|
||||
' --- SCASSO ---
|
||||
CreateMachiningList(MCH_MY.POCKETING, m_AvailableMillList, m_CurrPocketingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_CurrPocketingList.Count = 0 Then
|
||||
If m_CurrPocketingList.Count <= 1 Then
|
||||
CurrentMachine.sCurrPocketing = String.Empty
|
||||
End If
|
||||
|
||||
' --- WATERJET ---
|
||||
CreateMachiningList(MCH_MY.WATERJETTING, m_AvailableWaterjetList, m_CurrWaterjettingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
If m_CurrWaterjettingList.Count = 0 Then
|
||||
If m_CurrWaterjettingList.Count <= 1 Then
|
||||
CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
m_CurrWaterjettingQualityList = New List(Of String)(CurrentMachine.Qualities)
|
||||
@@ -472,11 +520,13 @@ Public Class CurrMachWindowVM
|
||||
|
||||
If m_CurrSawingList.Count > 0 Then
|
||||
If CurrentMachine.sCurrSawing <> String.Empty Then
|
||||
SelCurrSawing = CurrentMachine.sCurrSawing
|
||||
SetCurrSawing(CurrentMachine.sCurrSawing)
|
||||
Else
|
||||
Dim sCurrSawing As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWING, Nothing, sCurrSawing, sMachIniFile)
|
||||
SelCurrSawing = sCurrSawing
|
||||
' GetPrivateProfileString(S_MACH_MACH, K_CURRSAWING, Nothing, sCurrSawing, sMachIniFile)
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWING_OFFICE, Nothing, sCurrSawing, sMachIniFile)
|
||||
'SelCurrSawing = sCurrSawing
|
||||
SetCurrSawing(sCurrSawing)
|
||||
End If
|
||||
Else
|
||||
CurrentMachine.sCurrSawing = String.Empty
|
||||
@@ -486,7 +536,11 @@ Public Class CurrMachWindowVM
|
||||
If CurrentMachine.bDrilling And m_CurrDrillingList.Count > 1 Then
|
||||
CurrDrilling_Visibility = Visibility.Visible
|
||||
If CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||
SelCurrDrilling = CurrentMachine.sCurrDrilling
|
||||
SetCurrDrilling(CurrentMachine.sCurrDrilling)
|
||||
Else
|
||||
Dim sCurrMachining As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILLING_OFFICE, Nothing, sCurrMachining, sMachIniFile)
|
||||
SetCurrDrilling(sCurrMachining)
|
||||
End If
|
||||
Else
|
||||
CurrDrilling_Visibility = Visibility.Collapsed
|
||||
@@ -495,7 +549,11 @@ Public Class CurrMachWindowVM
|
||||
If CurrentMachine.bMilling And m_CurrMillingList.Count > 1 Then
|
||||
CurrMilling_Visibility = Visibility.Visible
|
||||
If CurrentMachine.sCurrMilling <> String.Empty Then
|
||||
SelCurrMilling = CurrentMachine.sCurrMilling
|
||||
SetCurrMilling(CurrentMachine.sCurrMilling)
|
||||
Else
|
||||
Dim sCurrMachining As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRMILLING_OFFICE, Nothing, sCurrMachining, sMachIniFile)
|
||||
SetCurrMilling(sCurrMachining)
|
||||
End If
|
||||
Else
|
||||
CurrMilling_Visibility = Visibility.Collapsed
|
||||
@@ -504,7 +562,11 @@ Public Class CurrMachWindowVM
|
||||
If CurrentMachine.bPocketing And CurrPocketingList.Count > 1 Then
|
||||
CurrPocketing_Visibility = Visibility.Visible
|
||||
If CurrentMachine.sCurrPocketing <> String.Empty Then
|
||||
SelCurrPocketing = CurrentMachine.sCurrPocketing
|
||||
SetCurrPocketing(CurrentMachine.sCurrPocketing)
|
||||
Else
|
||||
Dim sCurrMachining As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRPOCKETING_OFFICE, Nothing, sCurrMachining, sMachIniFile)
|
||||
SetCurrPocketing(sCurrMachining)
|
||||
End If
|
||||
Else
|
||||
CurrPocketing_Visibility = Visibility.Collapsed
|
||||
@@ -515,10 +577,18 @@ Public Class CurrMachWindowVM
|
||||
' se DB WaterJet abilitato avrò anche la CmBx della Quality solo la CmBx del Waterjetting corrente
|
||||
If CurrentMachine.bFromDBWaterJet Then
|
||||
If CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
SelCurrWaterjetting = CurrentMachine.sCurrWaterJetting
|
||||
SetCurrWaterjetting(CurrentMachine.sCurrWaterJetting)
|
||||
Else
|
||||
Dim sCurrMachining As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING_OFFICE, Nothing, sCurrMachining, sMachIniFile)
|
||||
SetCurrWaterjetting(sCurrMachining)
|
||||
End If
|
||||
If CurrentMachine.sCurrWaterJettingQuality <> String.Empty Then
|
||||
SelCurrWaterjettingQuality = CurrentMachine.sCurrWaterJettingQuality
|
||||
SetCurrWaterjettingQuality(CurrentMachine.sCurrWaterJettingQuality)
|
||||
Else
|
||||
Dim sCurrMachining As String = ""
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY_OFFICE, Nothing, sCurrMachining, sMachIniFile)
|
||||
SetCurrWaterjettingQuality(sCurrMachining)
|
||||
End If
|
||||
CurrWaterjettingQuality_Visibility = Visibility.Visible
|
||||
Else
|
||||
|
||||
@@ -112,7 +112,7 @@ Public Class DxfImportSceneHostV
|
||||
|
||||
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportDxfScene.OnMouseDownScene
|
||||
' Solo se in modalità angoli o gocciolatoio su lati esterni
|
||||
If DxfImportWindowMap.refDxfImportWindowVM.SideAngle_IsChecked Or DxfImportWindowMap.refDxfImportWindowVM.Drip_IsChecked Then
|
||||
If DxfImportWindowMap.refDxfImportWindowVM.SideAngle_IsChecked Or DxfImportWindowMap.refDxfImportWindowVM.Drip_IsChecked Or DxfImportWindowMap.refDxfImportWindowVM.Engrave_IsChecked Then
|
||||
OnMouseDownSceneSideAngle(e)
|
||||
ElseIf DxfImportWindowMap.refDxfImportWindowVM.FiloTop_IsChecked Then
|
||||
OnMouseDownSceneFiloTop(e)
|
||||
|
||||
@@ -6,14 +6,200 @@
|
||||
Title="{Binding TitleMsg}"
|
||||
IsMinimizable="False"
|
||||
ShowInTaskbar="False"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}" WindowStartupLocation="CenterOwner">
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}" WindowStartupLocation="CenterOwner"
|
||||
xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<!--gradiente colore-->
|
||||
|
||||
<!--<Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<theme:ScrollChrome x:Name="Chrome" RenderPressed="{TemplateBinding IsPressed}" RenderMouseOver="{TemplateBinding IsMouseOver}" SnapsToDevicePixels="true" theme:ScrollChrome.ScrollGlyph="{TemplateBinding theme:ScrollChrome.ScrollGlyph}"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>-->
|
||||
|
||||
<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border x:Name="Background" CornerRadius="0" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<Grid Background="Transparent" Margin="1">
|
||||
<Border Opacity="0" x:Name="BackgroundAnimation" Background="Transparent" />
|
||||
<Rectangle x:Name="BackgroundGradient" RadiusX="8" RadiusY="8" Fill="#FF095CA8" Stroke="#1C1D22" StrokeThickness="0.5">
|
||||
<!--<Rectangle.Fill>
|
||||
<LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
|
||||
<GradientStop Color="#1C1D22" Offset="0.375" />
|
||||
<GradientStop Color="#1C1D22" Offset="0.625" />
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.Fill>-->
|
||||
</Rectangle>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--<Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>-->
|
||||
|
||||
<Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarStyle1" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="Width" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
|
||||
<Setter Property="MinWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
||||
<Grid x:Name="Bg" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MaxHeight="1"/>
|
||||
<RowDefinition Height="0.00001*"/>
|
||||
<RowDefinition MaxHeight="1"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--<RepeatButton Command="{x:Static ScrollBar.LineUpCommand}" IsEnabled="{TemplateBinding IsMouseOver}" />-->
|
||||
<Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
|
||||
</Track.IncreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb Style="{StaticResource ScrollBarThumb}"/>
|
||||
</Track.Thumb>
|
||||
</Track>
|
||||
<!--<RepeatButton Command="{x:Static ScrollBar.LineDownCommand}" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="2" theme:ScrollChrome.ScrollGlyph="DownArrow"/>-->
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" TargetName="Bg" Value="Transparent"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<!--<Style.Triggers>
|
||||
<Trigger Property="Orientation" Value="Horizontal">
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="MinWidth" Value="0"/>
|
||||
<Setter Property="Height" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
|
||||
<Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
||||
<Grid x:Name="Bg" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
|
||||
<ColumnDefinition Width="0.00001*"/>
|
||||
<ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<RepeatButton Command="{x:Static ScrollBar.LineLeftCommand}" IsEnabled="{TemplateBinding IsMouseOver}" theme:ScrollChrome.ScrollGlyph="LeftArrow" Style="{StaticResource CustomScrollBarButton}"/>
|
||||
<Track x:Name="PART_Track" Grid.Column="1" IsEnabled="{TemplateBinding IsMouseOver}">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource CustomScrollBarButton}"/>
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource CustomScrollBarButton}"/>
|
||||
</Track.IncreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb Style="{StaticResource ScrollBarThumb}"/>
|
||||
</Track.Thumb>
|
||||
</Track>
|
||||
<RepeatButton Command="{x:Static ScrollBar.LineRightCommand}" Grid.Column="2" IsEnabled="{TemplateBinding IsMouseOver}" theme:ScrollChrome.ScrollGlyph="RightArrow" Style="{StaticResource CustomScrollBarButton}"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" TargetName="Bg" Value="Transparent"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</Style.Triggers>-->
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollViewerStyle1" TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle x:Name="Corner" Grid.Column="1" Fill="{StaticResource Omag_Black}" Grid.Row="1"/>
|
||||
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanHorizontallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" CanVerticallyScroll="False" Grid.Column="0" Content="{TemplateBinding Content}" CanContentScroll="{TemplateBinding CanContentScroll}" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
|
||||
<ScrollBar Style="{DynamicResource ScrollBarStyle1}" x:Name="PART_VerticalScrollBar"
|
||||
AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1"
|
||||
Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0"
|
||||
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
|
||||
Margin="2,0,0,0"/>
|
||||
<ScrollBar Style="{DynamicResource ScrollBarStyle1}" x:Name="PART_HorizontalScrollBar"
|
||||
AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0"
|
||||
Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1"
|
||||
Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource Omag_Blue}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
|
||||
<DockPanel>
|
||||
<DockPanel>
|
||||
|
||||
<DockPanel DockPanel.Dock="Left"
|
||||
<DockPanel DockPanel.Dock="Left"
|
||||
Width="200"
|
||||
Margin="5,5,5,0">
|
||||
|
||||
|
||||
<UniformGrid Columns="{Binding nButton}" Rows="1"
|
||||
Margin="0,0,0,5"
|
||||
DockPanel.Dock="Top">
|
||||
@@ -40,145 +226,159 @@
|
||||
</Button>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
|
||||
<GroupBox Header="{Binding TypeMsg}"
|
||||
|
||||
<GroupBox Header="{Binding TypeMsg}"
|
||||
DockPanel.Dock="Top"
|
||||
IsEnabled="{Binding Type_IsEnabled}"
|
||||
BorderThickness="{StaticResource BorderGpBx_Thickness}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
Margin="0,0,0,5">
|
||||
<UniformGrid Columns="2" Rows="2">
|
||||
<Button Content="{Binding UseRegionMsg}"
|
||||
<UniformGrid Columns="2" Rows="2">
|
||||
<Button Content="{Binding UseRegionMsg}"
|
||||
IsEnabled="{Binding UseRegionIsEnabled}"
|
||||
Command="{Binding UseRegionCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"/>
|
||||
<Button Content="{Binding UseLayerMsg}"
|
||||
<Button Content="{Binding UseLayerMsg}"
|
||||
IsEnabled="{Binding UseLayerIsEnabled}"
|
||||
Command="{Binding UseLayerCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"/>
|
||||
<Button Content="{Binding UseClosedCurveMsg}"
|
||||
<Button Content="{Binding UseClosedCurveMsg}"
|
||||
IsEnabled="{Binding UseClosedCurveIsEnabled}"
|
||||
Command="{Binding UseClosedCurveCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"/>
|
||||
<Button Content="{Binding ResetMsg}"
|
||||
<Button Content="{Binding ResetMsg}"
|
||||
IsEnabled="{Binding ResetIsEnabled}"
|
||||
Command="{Binding ResetCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="{Binding MeasureUnitMsg}"
|
||||
<GroupBox Header="{Binding MeasureUnitMsg}"
|
||||
IsEnabled="{Binding Measure_IsEnabled}"
|
||||
DockPanel.Dock="Top"
|
||||
BorderThickness="{StaticResource BorderGpBx_Thickness}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
Margin="0,0,0,5">
|
||||
<UniformGrid Columns="2">
|
||||
<RadioButton Content="{Binding MmMsg}"
|
||||
<UniformGrid Columns="2">
|
||||
<RadioButton Content="{Binding MmMsg}"
|
||||
IsChecked="{Binding MmIsChecked}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
||||
<RadioButton Content="{Binding InchMsg}"
|
||||
<RadioButton Content="{Binding InchMsg}"
|
||||
IsChecked="{Binding InchIsChecked, Mode=OneWay}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<UniformGrid Columns="4"
|
||||
<UniformGrid Columns="5"
|
||||
DockPanel.Dock="Top"
|
||||
IsEnabled="{Binding SideEntity_IsEnabled}"
|
||||
Margin="0,0,0,5">
|
||||
<!--Inclina lati-->
|
||||
<ToggleButton Content="{Binding SideAngleMsg}"
|
||||
Margin="0,0,0,5">
|
||||
<!--Inclina lati-->
|
||||
<ToggleButton Content="{Binding SideAngleMsg}"
|
||||
IsChecked="{Binding SideAngle_IsChecked}"
|
||||
Style="{StaticResource CompoWindow_WrapToggleButton}"/>
|
||||
|
||||
<!--Filo Top-->
|
||||
<ToggleButton Content="{Binding FiloTopMsg}"
|
||||
<!--Filo Top-->
|
||||
<ToggleButton Content="{Binding FiloTopMsg}"
|
||||
IsChecked="{Binding FiloTop_IsChecked}"
|
||||
Style="{StaticResource CompoWindow_WrapToggleButton}"/>
|
||||
|
||||
<ToggleButton Content="{Binding EngraveMsg}"
|
||||
IsChecked="{Binding Engrave_IsChecked}"
|
||||
Style="{StaticResource CompoWindow_WrapToggleButton}"/>
|
||||
|
||||
<!--Incidi da sotto-->
|
||||
<ToggleButton Content="{Binding DripMsg}"
|
||||
<ToggleButton Content="{Binding DripMsg}"
|
||||
IsChecked="{Binding Drip_IsChecked}"
|
||||
Style="{StaticResource CompoWindow_WrapToggleButton}"
|
||||
IsEnabled="{Binding Drip_IsEnabled}"/>
|
||||
<!--Fora da sotto-->
|
||||
<ToggleButton Content="{Binding UnderDrillMsg}"
|
||||
<!--Fora da sotto-->
|
||||
<ToggleButton Content="{Binding UnderDrillMsg}"
|
||||
IsChecked="{Binding UnderDrill_IsChecked}"
|
||||
Style="{StaticResource CompoWindow_WrapToggleButton}"
|
||||
IsEnabled="{Binding Drip_IsEnabled}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid DockPanel.Dock="Bottom"
|
||||
<UniformGrid DockPanel.Dock="Bottom"
|
||||
Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<Button x:Name="OkBtn"
|
||||
<Button x:Name="OkBtn"
|
||||
Content="{Binding OkMsg}"
|
||||
IsEnabled="{Binding OkIsEnabled}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"/>
|
||||
<Button x:Name="CancelBtn"
|
||||
<Button x:Name="CancelBtn"
|
||||
Content="{Binding CancelMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
<Grid DockPanel.Dock="Bottom"
|
||||
Visibility="{Binding PartData_Visibility}"
|
||||
Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<GroupBox Header="Dati pezzo"
|
||||
BorderThickness="{StaticResource BorderGpBx_Thickness}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
Margin="0">
|
||||
<ScrollViewer Style="{DynamicResource ScrollViewerStyle1}" VerticalScrollBarVisibility="Auto" Focusable="False">
|
||||
<StackPanel>
|
||||
<Grid Visibility="{Binding PartData_Visibility}"
|
||||
Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding PartNumMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding PartNum}"
|
||||
<TextBlock Text="{Binding PartNumMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding PartNum}"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid DockPanel.Dock="Bottom"
|
||||
Visibility="{Binding PartData_Visibility}"
|
||||
Margin="0,0,0,10">
|
||||
<TextBlock Text="{Binding TopMsg}"/>
|
||||
<CheckBox IsChecked="{Binding TopIsChecked}"
|
||||
HorizontalAlignment="Right" Margin="6,0,6,0"/>
|
||||
</Grid>
|
||||
<Grid Visibility="{Binding PartData_Visibility}"
|
||||
Margin="0,0,0,10">
|
||||
<TextBlock Text="{Binding TopMsg}"/>
|
||||
<CheckBox IsChecked="{Binding TopIsChecked}"
|
||||
HorizontalAlignment="Right" Margin="6,0,6,0"/>
|
||||
</Grid>
|
||||
|
||||
<Grid DockPanel.Dock="Bottom"
|
||||
Visibility="{Binding OrderList_Visibility}"
|
||||
Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Visibility="{Binding OrderList_Visibility}"
|
||||
Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding ListMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding List}"
|
||||
<TextBlock Text="{Binding ListMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding List}"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid DockPanel.Dock="Bottom"
|
||||
Visibility="{Binding OrderList_Visibility}"
|
||||
Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Visibility="{Binding OrderList_Visibility}"
|
||||
Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding OrderMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Order}"
|
||||
<TextBlock Text="{Binding OrderMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Order}"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Text="{Binding OutputMessage}"
|
||||
Foreground="{Binding MsgColor}"
|
||||
DockPanel.Dock="Bottom"
|
||||
TextWrapping="Wrap"
|
||||
TextAlignment="Center"
|
||||
Margin="0,0,0,20"/>
|
||||
<TextBlock Text="{Binding OutputMessage}"
|
||||
Foreground="{Binding MsgColor}"
|
||||
DockPanel.Dock="Bottom"
|
||||
TextWrapping="Wrap"
|
||||
TextAlignment="Center"
|
||||
Margin="0,0,0,20"/>
|
||||
|
||||
<ContentControl VerticalAlignment="Center"
|
||||
Content="{Binding SideEntityControl}" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</GroupBox>
|
||||
|
||||
<ContentControl VerticalAlignment="Center"
|
||||
Content="{Binding SideEntityControl}"/>
|
||||
</DockPanel>
|
||||
|
||||
</DockPanel>
|
||||
<OmagOFFICE:DxfImportSceneHostV/>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
<OmagOFFICE:DxfImportSceneHostV/>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
|
||||
@@ -142,7 +142,7 @@ Public Class DxfImportWindowVM
|
||||
Return m_SideAngle_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If m_Drip_IsChecked Or m_UnderDrill_IsChecked Or m_FiloTop_IsChecked Then Return
|
||||
If m_Drip_IsChecked Or m_UnderDrill_IsChecked Or m_FiloTop_IsChecked Or m_Engrave_IsChecked Then Return
|
||||
m_SideAngle_IsChecked = value
|
||||
If value Then
|
||||
' Aggiungo regioni per percorsi interni
|
||||
@@ -190,7 +190,7 @@ Public Class DxfImportWindowVM
|
||||
Return m_FiloTop_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If m_SideAngle_IsChecked Or m_Drip_IsChecked Or m_UnderDrill_IsChecked Then Return
|
||||
If m_SideAngle_IsChecked Or m_Drip_IsChecked Or m_UnderDrill_IsChecked Or m_Engrave_IsChecked Then Return
|
||||
m_FiloTop_IsChecked = value
|
||||
If value Then
|
||||
' Aggiungo regioni per percorsi interni
|
||||
@@ -233,13 +233,61 @@ Public Class DxfImportWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Engrave_IsChecked As Boolean
|
||||
Public Property Engrave_IsChecked As Boolean
|
||||
Get
|
||||
Return m_Engrave_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If m_Drip_IsChecked Or m_UnderDrill_IsChecked Or m_FiloTop_IsChecked Or m_SideAngle_IsChecked Then Return
|
||||
m_Engrave_IsChecked = value
|
||||
If value Then
|
||||
' Aggiungo regioni per percorsi interni
|
||||
AdjustSelectRegions()
|
||||
' Messaggio di selezione contorno
|
||||
SetOutputMessage(EgtMsg(MSG_DRAWPAGEUC + 6), MSG_TYPE.INFO) ' Selezionare un contorno
|
||||
' Imposto modalità sideangle
|
||||
m_SideEntityControlVM = New SideEntityControlVM(SideEntityControlVM.CallingWindowOpt.DXFIMPORT,
|
||||
DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene,
|
||||
SideEntityControlVM.ModeOpt.ENGRAVE)
|
||||
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
|
||||
Open_IsEnabled = False
|
||||
Type_IsEnabled = False
|
||||
Measure_IsEnabled = False
|
||||
PartData_Visibility = Visibility.Collapsed
|
||||
OrderList_Visibility = Visibility.Collapsed
|
||||
OkIsEnabled = False
|
||||
Else
|
||||
' Rimuovo regioni per percorsi interni
|
||||
RemoveSelectRegions()
|
||||
m_SideEntityControlVM.Close()
|
||||
Open_IsEnabled = True
|
||||
Type_IsEnabled = True
|
||||
Measure_IsEnabled = True
|
||||
PartData_Visibility = Visibility.Visible
|
||||
OrderList_Visibility = Visibility.Visible
|
||||
OkIsEnabled = True
|
||||
m_SideEntityControlVM = Nothing
|
||||
SideEntityControl = Nothing
|
||||
' Elimino scritte angoli per input e inserisco quelle definitive
|
||||
SideEntityControlVM.WriteSideAngleForNest(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
||||
' Deseleziono tutto
|
||||
DxfImportWindowMap.refDxfImportSceneHostV.Deselect()
|
||||
' Pulisco area messaggi
|
||||
ClearOutputMessage()
|
||||
End If
|
||||
NotifyPropertyChanged("EngraveIsChecked")
|
||||
EgtZoom(ZM.ALL)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Drip_IsChecked As Boolean
|
||||
Public Property Drip_IsChecked As Boolean
|
||||
Get
|
||||
Return m_Drip_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If m_SideAngle_IsChecked Or m_UnderDrill_IsChecked Or m_FiloTop_IsChecked Then Return
|
||||
If m_SideAngle_IsChecked Or m_UnderDrill_IsChecked Or m_FiloTop_IsChecked Or m_Engrave_IsChecked Then Return
|
||||
m_Drip_IsChecked = value
|
||||
If value Then
|
||||
' Messaggio di selezione contorno
|
||||
@@ -283,7 +331,7 @@ Public Class DxfImportWindowVM
|
||||
Return m_UnderDrill_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If m_SideAngle_IsChecked Or m_Drip_IsChecked Or m_FiloTop_IsChecked Then Return
|
||||
If m_SideAngle_IsChecked Or m_Drip_IsChecked Or m_FiloTop_IsChecked Or m_Engrave_IsChecked Then Return
|
||||
m_UnderDrill_IsChecked = value
|
||||
If value Then
|
||||
' Aggiungo regioni di selezione per percorsi interni
|
||||
@@ -493,6 +541,12 @@ Public Class DxfImportWindowVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property EngraveMsg As String
|
||||
Get
|
||||
Return EgtMsg(90397)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DripMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_IMPORTPAGEUC + 8)
|
||||
@@ -646,9 +700,13 @@ Public Class DxfImportWindowVM
|
||||
Case FT.DXF
|
||||
' recupero unità di misura del file
|
||||
Dim dScale As Double = If(m_MmIsChecked, ONEMM, ONEINCH)
|
||||
' Importo file DXF
|
||||
If Not EgtImportDxf(m_sFilePath, dScale) Then Return False
|
||||
Case FT.NGE
|
||||
' Importo file DXF
|
||||
If Not EgtImportDxf(m_sFilePath, dScale) Then Return False
|
||||
' Riporto al piano tutte le superifici
|
||||
EgtSelectAll()
|
||||
EgtScale(GDB_ID.SEL, Frame3d.GLOB, 1, 1, 0)
|
||||
EgtDeselectAll()
|
||||
Case FT.NGE
|
||||
' Carico Nge
|
||||
If Not EgtOpenFile(m_sFilePath) Then Return False
|
||||
' Filtro Nge
|
||||
@@ -710,6 +768,8 @@ Public Class DxfImportWindowVM
|
||||
EgtErase(EgtGetFirstNameInGroup(PartId, SELECT_REGION_LAYER))
|
||||
PartId = EgtGetNextPart(PartId)
|
||||
End While
|
||||
' identificativo univoico del gruppo di pezzi, se più di un pezzo
|
||||
Dim sGUICode As New List(Of String)
|
||||
' Scrivo testi per nesting
|
||||
SideEntityControlVM.WriteSideAngleForNest(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
||||
' Imposto riferimento sul centro geometrico di ogni pezzo
|
||||
@@ -732,10 +792,33 @@ Public Class DxfImportWindowVM
|
||||
Dim bDirect As Boolean = (GetMainPrivateProfileInt(S_NEST, K_DIRECT, 0) <> 0)
|
||||
' Elimino eventuali precedenti pezzi vuoti
|
||||
EgtEraseEmptyParts()
|
||||
' creo il riferimento
|
||||
If m_PartNum > 1 Then
|
||||
' per ogni pezze del file DXF creo un gruppo
|
||||
Dim nIdTemp As Integer = EgtGetFirstPart()
|
||||
While nIdTemp <> GDB_ID.NULL
|
||||
Dim sPreGuid As String = CreatePreGuidCode(nIdTemp)
|
||||
sGUICode.Add(sPreGuid & System.Guid.NewGuid.ToString)
|
||||
nIdTemp = EgtGetNextPart(nIdTemp)
|
||||
End While
|
||||
End If
|
||||
' Inserisco i pezzi nell'ambiente principale e recupero Id primo pezzo inserito
|
||||
Dim nFirstId As Integer = EgtGetLastPart()
|
||||
For nInd As Integer = 1 To m_PartNum
|
||||
Dim nFirst2Id As Integer = EgtGetLastPart()
|
||||
EgtInsertFile(sTmpFile)
|
||||
Dim FirstOfImport As Integer = EgtGetNextPart(nFirst2Id)
|
||||
Dim Index As Integer = 1
|
||||
While FirstOfImport <> GDB_ID.NULL And Index <= sGUICode.Count
|
||||
If Not String.IsNullOrEmpty(sGUICode(Index - 1)) Then
|
||||
EgtSetInfo(FirstOfImport, INFO_REFGROUP, sGUICode(Index - 1))
|
||||
Index += 1
|
||||
Else
|
||||
Exit While
|
||||
End If
|
||||
FirstOfImport = EgtGetNextPart(FirstOfImport)
|
||||
End While
|
||||
nFirst2Id = If(nFirst2Id <> GDB_ID.NULL, EgtGetNextPart(nFirst2Id), EgtGetFirstPart())
|
||||
Next
|
||||
nFirstId = If(nFirstId <> GDB_ID.NULL, EgtGetNextPart(nFirstId), EgtGetFirstPart())
|
||||
' Cancello il file
|
||||
@@ -815,7 +898,7 @@ Public Class DxfImportWindowVM
|
||||
|
||||
Friend Sub SelectedPartChanged()
|
||||
' Se sono in modalità inclinazioni o gocciolatoio calcolo lati inclinabili e creo testi
|
||||
If SideAngle_IsChecked() Or Drip_IsChecked() Or FiloTop_IsChecked Then
|
||||
If SideAngle_IsChecked() Or Drip_IsChecked() Or FiloTop_IsChecked Or Engrave_IsChecked Then
|
||||
m_SideEntityControlVM.ReLoadSideAnglePage(SideEntityControlVM.CallingWindowOpt.DXFIMPORT)
|
||||
End If
|
||||
End Sub
|
||||
@@ -900,9 +983,9 @@ Public Class DxfImportWindowVM
|
||||
Private Sub SetMsgColor(nMsgType As MSG_TYPE)
|
||||
Select Case nMsgType
|
||||
Case MSG_TYPE.INFO
|
||||
m_MsgColor = Brushes.Black
|
||||
m_MsgColor = Brushes.White
|
||||
Case MSG_TYPE.WARNING
|
||||
m_MsgColor = Brushes.SaddleBrown
|
||||
m_MsgColor = Brushes.Gold
|
||||
Case MSG_TYPE.ERROR_
|
||||
m_MsgColor = Brushes.Red
|
||||
End Select
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Security.Cryptography
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Friend Module CamAuto
|
||||
|
||||
@@ -24,15 +26,18 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91017), MSG_TYPE.WARNING)
|
||||
End If
|
||||
ResetOrderMachiningFlag()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function AddWaterJetMachining( nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
||||
Friend Function AddWaterJetMachining(nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||
@@ -42,9 +47,34 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJet")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
' m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' versione CamAuto 2.6l1: gestione tagli con ridotto affondamento
|
||||
Friend Function AddWaterJetMachining(LocaList As List(Of Integer), ByRef nWarn As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
For i As Integer = 0 To LocaList.Count - 1
|
||||
EgtLuaSetGlobIntVar("CAM.TAB_OPERID." & (i + 1).ToString, LocaList(i))
|
||||
Next
|
||||
Dim nErr As Integer = 999
|
||||
Dim bOk As Boolean = EgtLuaExecFile(m_sCamAutoDir & "\CamAuto.lua")
|
||||
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJets")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -58,9 +88,11 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
ResetOrderMachiningFlag()
|
||||
Return bOk
|
||||
@@ -75,9 +107,11 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertVerticalCut")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -88,6 +122,7 @@ Friend Module CamAuto
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllMachinings(ByRef nWarn As Integer) As Boolean
|
||||
EgtOutLog(" ++ ReserAllMachining ++ ")
|
||||
' Cancello tutte le lavorazioni
|
||||
EraseMachinings(GDB_ID.NULL)
|
||||
' Reinserisco tutte le lavorazioni piane (non sono previste le lavorazioni delle cornici)
|
||||
@@ -95,6 +130,145 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllSplitCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, "AUX_SPLIT_WJ")
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
EgtRemoveInfo(nIdMy, "JoinEntity")
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, "AUX_SPLIT_WJ")
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
EgtRemoveInfo(nIdMy, "JoinEntity")
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllStartCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
EgtRemoveInfo(nIdLayerOutLoop, "Start")
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
EgtRemoveInfo(nIdLayerOutLoop, "Start")
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllBridges() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
Dim nBridgesGroup As Integer = EgtGetFirstNameInGroup(nMachGroup, "Bridges")
|
||||
bOk = EgtErase(nBridgesGroup)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllSplitCut() As Boolean
|
||||
Dim PartList As New List(Of Integer)
|
||||
' Ricerca nei grezzi dei pezzi (devono essere ricercati tra quelli presenti nei grezzi)
|
||||
Dim bOk As Boolean = True
|
||||
' Recupero il numero di fasi presenti nel progetto
|
||||
Dim nPhaseCount As Integer = EgtGetPhaseCount()
|
||||
For nPhase As Integer = 1 To nPhaseCount
|
||||
EgtSetCurrPhase(nPhase)
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
Dim nParId As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If EgtVerifyRawPartPhase(nRawId, nPhase) Then
|
||||
While nParId <> GDB_ID.NULL
|
||||
Dim nNextParId As Integer = EgtGetNextPartInRawPart(nParId)
|
||||
' verifico se il pezzo passato è un taglio di sepatazione (il nome deve contenere "SpliCut")
|
||||
Dim sName As String = String.Empty
|
||||
If EgtGetName(nParId, sName) AndAlso sName.Contains(SPLIT_CUT) Then
|
||||
' Rimuovo il pezzo dal grezzo
|
||||
If EgtRemovePartFromRawPart(nParId) Then
|
||||
' Salvo l'indice del pezzo se non è stato già inserito
|
||||
Dim nIndex As Integer = PartList.FirstOrDefault(Function(nId) nId = nParId)
|
||||
If nIndex = 0 Then PartList.Add(nParId)
|
||||
End If
|
||||
End If
|
||||
nParId = nNextParId
|
||||
End While
|
||||
End If
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
Next
|
||||
' Reimposto la prima fase del progetto
|
||||
EgtSetCurrPhase(1)
|
||||
' Procedo ad eliminare il pezzo
|
||||
For Each Item As Integer In PartList
|
||||
bOk = bOk And EgtErase(Item)
|
||||
Next
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function RemoveCurrentSplitCut(nIdSplitCut As Integer) As Boolean
|
||||
Dim bOk As Boolean = False
|
||||
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
Dim nParId As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If EgtVerifyRawPartPhase(nRawId, nCurrPhase) Then
|
||||
While nParId <> GDB_ID.NULL
|
||||
If nParId = nIdSplitCut Then
|
||||
' Rimuovo il pezzo dal grezzo
|
||||
bOk = EgtRemovePartFromRawPart(nParId)
|
||||
Exit While
|
||||
End If
|
||||
nParId = EgtGetNextPartInRawPart(nParId)
|
||||
End While
|
||||
End If
|
||||
If bOk Then Exit While
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
' Elimino il pezzo
|
||||
bOk = bOk And EgtErase(nIdSplitCut)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' verifico che il contorno passato non sia stato separato
|
||||
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer) As Boolean
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim nValInfo As Integer = 1
|
||||
If EgtGetInfo(nIdMy, "JoinEntity", nValInfo) Then
|
||||
If nValInfo = 0 Then Return False
|
||||
End If
|
||||
EgtRemoveInfo(nIdMy, "JoinEntity")
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function RemoveFinalEmptyPhases() As Boolean
|
||||
Dim nOpeId As Integer = EgtGetLastOperation()
|
||||
While nOpeId <> GDB_ID.NULL
|
||||
@@ -133,9 +307,11 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -149,9 +325,11 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -166,9 +344,11 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.SpecApplyDisp")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
If ResetOrderMachiningFlag() Then
|
||||
ResetOrderMachiningFlag()
|
||||
@@ -184,7 +364,7 @@ Friend Module CamAuto
|
||||
EgtGetGroupObjs(EgtGetFirstNameInGroup(nPartId, NAME_UNDERDRILL)) = 0 Then
|
||||
Return True
|
||||
End If
|
||||
' Se tutti i pezzi
|
||||
' Se tutti i pezzi
|
||||
Else
|
||||
' Salvo fase attualmente corrente
|
||||
Dim nOriPhase As Integer = EgtGetCurrPhase()
|
||||
@@ -311,6 +491,7 @@ Friend Module CamAuto
|
||||
Return EgtRemoveOperationHome(nId)
|
||||
End Function
|
||||
|
||||
' DA AGGIORNARE PER CAMBIO UTENSILE LAMA
|
||||
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
@@ -325,9 +506,9 @@ Friend Module CamAuto
|
||||
Dim sTool2 As String = String.Empty
|
||||
EgtGetMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||
EgtTdbGetToolFromUUID(sTuuid, sTool)
|
||||
If String.IsNullOrWhiteSpace( sTool) Then
|
||||
If String.IsNullOrWhiteSpace(sTool) Then
|
||||
Dim sMchTool As String = ""
|
||||
EgtGetMachiningParam( MCH_MP.TOOL, sMchTool)
|
||||
EgtGetMachiningParam(MCH_MP.TOOL, sMchTool)
|
||||
bOk = False
|
||||
If sMissingTools.IndexOf(sMchTool) = -1 Then
|
||||
sMissingTools = sMissingTools & sMchTool & ", "
|
||||
@@ -341,7 +522,7 @@ Friend Module CamAuto
|
||||
sTool2 = sTool & "-2"
|
||||
End If
|
||||
If String.Compare(sTool, CurrentMachine.sCurrSaw) <> 0 AndAlso
|
||||
( String.IsNullOrWhiteSpace( sTool2) OrElse String.Compare(sTool2, CurrentMachine.sCurrSaw) <> 0) AndAlso
|
||||
(String.IsNullOrWhiteSpace(sTool2) OrElse String.Compare(sTool2, CurrentMachine.sCurrSaw) <> 0) AndAlso
|
||||
String.Compare(sTool, CurrentMachine.sCurrDripSaw) <> 0 Then
|
||||
bOk = False
|
||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||
@@ -405,9 +586,10 @@ Friend Module CamAuto
|
||||
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, CurrentMachine.sMachIniFile)
|
||||
' Ciclo sulle lavorazioni
|
||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||
Dim LocalListOperId As New List(Of Integer)
|
||||
While nOperId <> GDB_ID.NULL
|
||||
' verifico sia una lavorazione valida di taglio con lama
|
||||
If IsValidMachining( nOperId) And EgtGetOperationType( nOperId) = MCH_OY.SAWING Then
|
||||
If IsValidMachining(nOperId) And EgtGetOperationType(nOperId) = MCH_OY.SAWING Then
|
||||
' verifica interferenza
|
||||
Dim nFlag As Integer = FMI_TYPE.NONE
|
||||
If Not VerifyComposedMachining(nOperId, nFlag) Then
|
||||
@@ -419,12 +601,14 @@ Friend Module CamAuto
|
||||
' se abilitato e attivo waterjet, lo aggiungo per completare il taglio
|
||||
If CurrentMachine.WaterJettingActive Then
|
||||
Dim nWarn As Integer = 0
|
||||
AddWaterJetMachining(nOperId, nWarn)
|
||||
LocalListOperId.Add(nOperId)
|
||||
'AddWaterJetMachining(nOperId, nWarn)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nOperId = EgtGetNextOperation(nOperId)
|
||||
End While
|
||||
If LocalListOperId.Count > 0 Then AddWaterJetMachining(LocalListOperId, 0)
|
||||
Return bModified
|
||||
End Function
|
||||
|
||||
@@ -528,8 +712,8 @@ Friend Module CamAuto
|
||||
If nOriLeadIn <> MCH_SAW_LI.STRICT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.STRICT)
|
||||
Dim dUserAddLen As Double = 0
|
||||
EgtGetInfo( nMchId, INFO_MCH_USER_SAL, dUserAddLen)
|
||||
EgtRemoveInfo( nMchId, INFO_MCH_USER_SAL)
|
||||
EgtGetInfo(nMchId, INFO_MCH_USER_SAL, dUserAddLen)
|
||||
EgtRemoveInfo(nMchId, INFO_MCH_USER_SAL)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
||||
@@ -548,8 +732,8 @@ Friend Module CamAuto
|
||||
If nOriLeadOut <> MCH_SAW_LO.STRICT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.STRICT)
|
||||
Dim dUserAddLen As Double = 0
|
||||
EgtGetInfo( nMchId, INFO_MCH_USER_EAL, dUserAddLen)
|
||||
EgtRemoveInfo( nMchId, INFO_MCH_USER_EAL)
|
||||
EgtGetInfo(nMchId, INFO_MCH_USER_EAL, dUserAddLen)
|
||||
EgtRemoveInfo(nMchId, INFO_MCH_USER_EAL)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
||||
@@ -719,6 +903,7 @@ Friend Module CamAuto
|
||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||
Dim sMaterial As String = CurrentMachine.CurrMat.sName
|
||||
Dim sSawMch As String = CurrentMachine.sCurrSawing
|
||||
Dim sSawTiltedMch As String = CurrentMachine.sCurrSawingTilted
|
||||
Dim sMillMch As String = CurrentMachine.sCurrMilling
|
||||
Dim sDrillMch As String = CurrentMachine.sCurrDrilling
|
||||
Dim sWaterJetMch As String = CurrentMachine.sCurrWaterJetting
|
||||
@@ -736,6 +921,7 @@ Friend Module CamAuto
|
||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, CurrentMachine.sMachIniFile)
|
||||
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.SAWTILTEDMCH", sSawTiltedMch)
|
||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
||||
@@ -756,24 +942,29 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' ver. 2.7f1
|
||||
Friend Function GetTableCount() As Integer
|
||||
If EgtGetTableId(MAIN_TAB) = GDB_ID.NULL Then Return 0
|
||||
If EgtGetTableId(SECOND_TAB) = GDB_ID.NULL Then Return 1
|
||||
If EgtGetTableId(THIRD_TAB) = GDB_ID.NULL Then Return 2
|
||||
Return 3
|
||||
If EgtGetTableId(FORTH_TAB) = GDB_ID.NULL Then Return 3
|
||||
Return 4
|
||||
End Function
|
||||
|
||||
Friend Function GetTableName(nInd As Integer) As String
|
||||
If nInd = 1 Then Return MAIN_TAB
|
||||
If nInd = 2 Then Return SECOND_TAB
|
||||
If nInd = 3 Then Return THIRD_TAB
|
||||
If nInd = 4 Then Return FORTH_TAB
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrentTable() As Integer
|
||||
Dim sTabName As String = MAIN_TAB
|
||||
EgtGetTableName(sTabName)
|
||||
If sTabName = THIRD_TAB Then
|
||||
If sTabName = FORTH_TAB Then
|
||||
Return 4
|
||||
ElseIf sTabName = THIRD_TAB Then
|
||||
Return 3
|
||||
ElseIf sTabName = SECOND_TAB Then
|
||||
Return 2
|
||||
@@ -880,13 +1071,13 @@ Friend Module CamAuto
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
If nRawId = GDB_ID.NULL Then Return False
|
||||
' Se non ci sono pezzi, esco
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If nPart1Id = GDB_ID.NULL Then Return True
|
||||
' Verifico se cornice curva
|
||||
Dim nDir As Integer = 0
|
||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = ( nDir = 0)
|
||||
Dim bCurved As Boolean = ( nDir >= 2)
|
||||
Dim bSwap As Boolean = (nDir = 0)
|
||||
Dim bCurved As Boolean = (nDir >= 2)
|
||||
' Recupero la lavorazione corrente di sgrossatura con lama
|
||||
Dim sCurrSawRou As String = CurrentMachine.sCurrSawRoughing
|
||||
If String.IsNullOrEmpty(sCurrSawRou) Then Return True
|
||||
@@ -913,8 +1104,8 @@ Friend Module CamAuto
|
||||
' Imposto la geometria
|
||||
EgtSetMachiningGeometry(vId)
|
||||
' Imposto trim iniziale e finale
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||
' Se cornice curva, imposto SCC
|
||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||
' Applico la lavorazione
|
||||
@@ -929,13 +1120,13 @@ Friend Module CamAuto
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
If nRawId = GDB_ID.NULL Then Return False
|
||||
' Se non ci sono pezzi, esco
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If nPart1Id = GDB_ID.NULL Then Return True
|
||||
' Verifico se cornice curva
|
||||
Dim nDir As Integer = 0
|
||||
EgtGetInfo( nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = ( nDir = 0)
|
||||
Dim bCurved As Boolean = ( nDir >= 2)
|
||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = (nDir = 0)
|
||||
Dim bCurved As Boolean = (nDir >= 2)
|
||||
' Recupero la lavorazione corrente di finitura con lama
|
||||
Dim sCurrSawFin As String = CurrentMachine.sCurrSawFinishing
|
||||
If String.IsNullOrEmpty(sCurrSawFin) Then Return True
|
||||
@@ -972,8 +1163,8 @@ Friend Module CamAuto
|
||||
' Imposto la geometria
|
||||
EgtSetMachiningGeometry(vId)
|
||||
' Imposto trim iniziale e finale
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||
' Se cornice curva, imposto SCC
|
||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||
' Applico la lavorazione
|
||||
@@ -988,13 +1179,13 @@ Friend Module CamAuto
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
If nRawId = GDB_ID.NULL Then Return False
|
||||
' Se non ci sono pezzi, esco
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If nPart1Id = GDB_ID.NULL Then Return True
|
||||
' Verifico se cornice curva
|
||||
Dim nDir As Integer = 0
|
||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = ( nDir = 0)
|
||||
Dim bCurved As Boolean = ( nDir >= 2)
|
||||
Dim bSwap As Boolean = (nDir = 0)
|
||||
Dim bCurved As Boolean = (nDir >= 2)
|
||||
' Recupero la lavorazione corrente di spatolatura con lama
|
||||
Dim sCurrSawSideFin As String = CurrentMachine.sCurrSawSideFinishing
|
||||
If String.IsNullOrEmpty(sCurrSawSideFin) Then Return True
|
||||
@@ -1015,8 +1206,8 @@ Friend Module CamAuto
|
||||
' Imposto la geometria
|
||||
EgtSetMachiningGeometry(vId)
|
||||
' Imposto trim iniziale e finale
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||
' Se cornice curva, imposto SCC
|
||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||
' Applico la lavorazione
|
||||
@@ -1155,14 +1346,14 @@ Friend Module CamAuto
|
||||
dStartDist = dEndDist
|
||||
dEndDist = dTemp
|
||||
End If
|
||||
' altrimenti
|
||||
' altrimenti
|
||||
Else
|
||||
Dim vtSide As Vector3d
|
||||
' Se faccia non limitata da altre o sopra la limitante
|
||||
If bFree Then
|
||||
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_DOWN)
|
||||
vtSide = Vector3d.Z_AX()
|
||||
' altrimenti è stata trovata una faccia adiacente limitante
|
||||
' altrimenti è stata trovata una faccia adiacente limitante
|
||||
Else
|
||||
If vtAdjN.x > 10 * EPS_SMALL Then
|
||||
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_LEFT)
|
||||
@@ -1253,4 +1444,14 @@ Friend Module CamAuto
|
||||
Return EgtApplyMachining(False)
|
||||
End Function
|
||||
|
||||
Friend Function GetRegistrationRotation() As Double
|
||||
Dim dRegRot As Double = 0
|
||||
EgtGetInfo(GetCurrentRaw(), INFO_REGROT, dRegRot)
|
||||
Return dRegRot
|
||||
End Function
|
||||
|
||||
Friend Function SetRegistrationRotation(dRegRot As Double) As Boolean
|
||||
Return EgtSetInfo(GetCurrentRaw(), INFO_REGROT, dRegRot)
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
@@ -33,6 +33,10 @@ Module ConstMach
|
||||
Public Const KEY_VACLAY_SEL As String = "Sel"
|
||||
' Info in gruppo layout per angolo di rotazione preferito
|
||||
Public Const KEY_VACLAY_PREFROT As String = "PreferredRot"
|
||||
Public Const KEY_VACLAY_PREFVROTXMINUS As String = "PrefVertRotXMinus"
|
||||
Public Const KEY_VACLAY_PREFVROTXPLUS As String = "PrefVertRotXPlus"
|
||||
Public Const KEY_VACLAY_PREFVROTYMINUS As String = "PrefVertRotYMinus"
|
||||
Public Const KEY_VACLAY_PREFVROTYPLUS As String = "PrefVertRotYPlus"
|
||||
' Info in gruppo layout per direzione di riferimento ventose per tagli da sotto
|
||||
Public Const KEY_VACLAY_DRIPREFDIR As String = "DripRefDir"
|
||||
' Info in asse rotante ventosa per step discreti
|
||||
@@ -44,6 +48,7 @@ Module ConstMach
|
||||
Public Const MAIN_TAB As String = "MainTab"
|
||||
Public Const SECOND_TAB As String = "2ndTab"
|
||||
Public Const THIRD_TAB As String = "3rdTab"
|
||||
Public Const FORTH_TAB As String = "4thTab"
|
||||
' Nome tavola ausiliaria per spostamento finale pezzi
|
||||
Public Const AUX_TAB As String = "AuxTab"
|
||||
|
||||
@@ -91,6 +96,9 @@ Module ConstMach
|
||||
Public Const INFO_RAW_BLOCK = "Block"
|
||||
' Info per numero lastra nel blocco
|
||||
Public Const INFO_RAW_SLABNBR = "SlabNbr"
|
||||
' Info per identificazione gruppo pezzi
|
||||
Public Const INFO_REFGROUP As String = "RefGroup"
|
||||
Public Const INFO_COUNTERLY As String = "CounterPz"
|
||||
|
||||
' Contrassegno di progetto OmagCut
|
||||
Public Const NAME_PROJMARK As String = "OmagCut"
|
||||
@@ -151,11 +159,15 @@ Module ConstMach
|
||||
Public Const NAME_UNDERDRILL As String = "UnderDrill"
|
||||
' Nome layer preview
|
||||
Public Const NAME_PREVIEW As String = "PV"
|
||||
Public Const NAME_BRIDGES As String = "Bridges"
|
||||
Public Const NAME_BRIDGESLINE As String = "BridgeLine"
|
||||
' Info in layer contorno interno per FiloTop
|
||||
Public Const INFO_FILOTOP As String = "FiloTop"
|
||||
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
||||
' Info in entità da tagliare per affondamento
|
||||
Public Const INFO_DEPTH As String = "Depth"
|
||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||
Public Const INFO_AGG2 As String = "Agg2"
|
||||
Public Const INFO_WIDTH As String = "Width"
|
||||
' Info in entità da tagliare per taglio ristretto
|
||||
Public Const INFO_STRICT As String = "Strict"
|
||||
@@ -244,6 +256,14 @@ Module ConstMach
|
||||
Public Const SELECT_REGION_LAYER As String = "SelectRegion"
|
||||
' Info in pezzo per stato rotazione
|
||||
Public Const INFO_PARTROT As String = "ROT"
|
||||
' Info in entità in OutLoop per indicare se è separata WaterJet
|
||||
Public Const INFO_JOINTENTITY As String = "JoinEntity"
|
||||
' Nome layer per "*" inidcanti un lato separato nel taglio WaterJet
|
||||
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
||||
' Info in OutLoop per punto inzio lavorazione WaterJet
|
||||
Public Const INFO_START As String = "Start"
|
||||
' Nome dei tagli diretti inseriti in fase di Splitting
|
||||
Public Const SPLIT_CUT As String = "SplitCut"
|
||||
|
||||
' Nome di pezzo che è una cornice
|
||||
Public Const NAME_FRAME As String = "Frame"
|
||||
@@ -310,6 +330,9 @@ Module ConstMach
|
||||
Public Function COL_MCH_DRIPCUT() As Color3d
|
||||
Return New Color3d(255, 0, 165)
|
||||
End Function
|
||||
Public Function COL_MCH_ONENGRAVE_ANG() As Color3d
|
||||
Return New Color3d(255, 255, 100)
|
||||
End Function
|
||||
Public Function COL_MCH_DRIPFREE() As Color3d
|
||||
Return New Color3d(192, 0, 128)
|
||||
End Function
|
||||
|
||||
@@ -122,6 +122,7 @@
|
||||
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
|
||||
Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable"
|
||||
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
|
||||
Public Const K_CHANGETABWD As String = "ChangeTabWD"
|
||||
|
||||
Public Const S_PHOTO As String = "Photo"
|
||||
Public Const K_PHOTO_OFFSETX As String = "OffsetX"
|
||||
@@ -198,6 +199,10 @@
|
||||
Public Const S_MACH_RAWMOVE As String = "RawMove"
|
||||
Public Const K_MACH_RM_ROTATE As String = "Rotate"
|
||||
Public Const K_MACH_RM_FINALMOVE As String = "FinalMove"
|
||||
Public Const K_MACH_WEIGHT_SINGLEPLUGGER As String = "MaxWeightSinglePlugger"
|
||||
Public Const K_MACH_WEIGHT_DOUBLEPLUGGER As String = "MaxWeightDoublePlugger"
|
||||
Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEY As String = "RotateVacuumForExtraStrokeY"
|
||||
Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEX As String = "RotateVacuumForExtraStrokeX"
|
||||
|
||||
Public Const S_MACH_REG As String = "Reg"
|
||||
Public Const K_MACH_MAX_ROT_ANG As String = "MaxRotAng"
|
||||
@@ -236,6 +241,7 @@
|
||||
|
||||
Public Const S_MACH_MACH As String = "Mach"
|
||||
Public Const K_CURRSAW As String = "CurrSaw"
|
||||
Public Const K_CURRSAWTILTED As String = "CurrSawTilted"
|
||||
Public Const K_CURRDRILL As String = "CurrDrill"
|
||||
Public Const K_CURRMILL As String = "CurrMill"
|
||||
Public Const K_CURRMILLNOTIP As String = "CurrMillNoTip"
|
||||
@@ -243,9 +249,14 @@
|
||||
Public Const K_CURRDRIPDRILL As String = "CurrDripDrill"
|
||||
Public Const K_CURRWATERJET As String = "CurrWaterJet"
|
||||
Public Const K_CURRSAWING As String = "CurrSawing"
|
||||
Public Const K_CURRSAWINGTILTED As String = "CurrSawingTilted"
|
||||
Public Const K_CURRSAWING_OFFICE As String = "CurrOfficeSawing"
|
||||
Public Const K_CURRDRILLING As String = "CurrDrilling"
|
||||
Public Const K_CURRDRILLING_OFFICE As String = "CurrOfficeDrilling"
|
||||
Public Const K_CURRMILLING As String = "CurrMilling"
|
||||
Public Const K_CURRMILLING_OFFICE As String = "CurrOfficeMilling"
|
||||
Public Const K_CURRPOCKETING As String = "CurrPocketing"
|
||||
Public Const K_CURRPOCKETING_OFFICE As String = "CurrOfficePocketing"
|
||||
Public Const K_CURRSAWROUGHING As String = "CurrSawRoughing"
|
||||
Public Const K_CURRSAWFINISHING As String = "CurrSawFinishing"
|
||||
Public Const K_CURRSAWSIDEFINISHING As String = "CurrSawSideFinishing"
|
||||
@@ -253,13 +264,16 @@
|
||||
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
||||
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
||||
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
||||
Public Const K_CURRWATERJETTING_OFFICE As String = "CurrOfficeWaterJetting"
|
||||
Public Const K_CURRWATERJETTINGQUALITY As String = "CurrWaterJettingQuality"
|
||||
Public Const K_CURRWATERJETTINGQUALITY_OFFICE As String = "CurrWaterJettingQuality"
|
||||
|
||||
Public Const S_MATERIALS As String = "Materials"
|
||||
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||
Public Const K_CURROFFICEMATERIAL As String = "CurrOfficeMaterial"
|
||||
Public Const K_MATERIAL As String = "Material"
|
||||
Public Const K_FROMDBWATERJET As String = "FromDBWaterJet"
|
||||
Public Const K_AVERAGEDENSITY As String = "AverageDensity"
|
||||
|
||||
Public Const S_SETUP As String = "SetUp"
|
||||
Public Const K_DEFAULT As String = "Default"
|
||||
|
||||
@@ -12,12 +12,19 @@ Module CsvM
|
||||
Return m_sCsvPath
|
||||
End Get
|
||||
End Property
|
||||
Private m_sFilePath As String = String.Empty
|
||||
Public ReadOnly Property FilePath As String
|
||||
Get
|
||||
Return m_sFilePath
|
||||
End Get
|
||||
End Property
|
||||
Private m_CsvPartList As New List(Of CsvPart)
|
||||
Public ReadOnly Property CsvPartList As List(Of CsvPart)
|
||||
Get
|
||||
Return m_CsvPartList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bCsvPartListModified As Boolean = False
|
||||
Private m_sCompoDir As String = String.Empty
|
||||
|
||||
@@ -36,12 +43,7 @@ Module CsvM
|
||||
|
||||
Public Sub NewCmd()
|
||||
' Salvo lista dei pezzi attuale (se modificata)
|
||||
If Not SaveCsvPartList() Then
|
||||
' Errore nel salvataggio del file CSV, vuoi continuare lo stesso ? - Errore
|
||||
If MessageBox.Show(EgtMsg(MSG_CSVPAGEUC + 5), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) <> MessageBoxResult.Yes Then
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
SaveCsvPartList()
|
||||
' Pulisco path e lista dei pezzi Csv
|
||||
m_sCsvPath = String.Empty
|
||||
m_CsvPartList.Clear()
|
||||
@@ -51,25 +53,33 @@ Module CsvM
|
||||
End Sub
|
||||
|
||||
Public Sub Open()
|
||||
' Salvo lista dei pezzi attuale (se modificata)
|
||||
If Not SaveCsvPartList() Then
|
||||
' Errore nel salvataggio del file CSV, vuoi continuare lo stesso ? - Errore
|
||||
If MessageBox.Show(EgtMsg(MSG_CSVPAGEUC + 5), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) <> MessageBoxResult.Yes Then
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' Leggo direttorio corrente dei file CSV
|
||||
Dim sCurrDir As String = ""
|
||||
GetMainPrivateProfileString(S_CSV, K_CSVCURRDIR, "C:\", sCurrDir)
|
||||
' Apro dialogo scelta file
|
||||
Dim CsvFileDlg As New Microsoft.Win32.OpenFileDialog()
|
||||
If Directory.Exists(sCurrDir) Then CsvFileDlg.InitialDirectory = sCurrDir
|
||||
CsvFileDlg.Filter = "Csv file (*.csv;*.epl)|*.csv;*.epl"
|
||||
Dim bFull = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.CSV_AUTO) And
|
||||
(GetMainPrivateProfileInt(S_CSV, K_FULL, 1) <> 0)
|
||||
Dim sFilterDialog As String = String.Empty
|
||||
Dim sDeniedFiles As List(Of String) = CreateListOfDeniedFiles()
|
||||
If bFull Then
|
||||
sFilterDialog = "Csv file (*.csv;*.epl)|*.csv;*.epl;Merge.epl"
|
||||
Else
|
||||
sFilterDialog = "Csv file (*.csv)|*.csv"
|
||||
End If
|
||||
CsvFileDlg.Filter = sFilterDialog
|
||||
|
||||
If Not CsvFileDlg.ShowDialog() Then Return
|
||||
|
||||
' Salvo lista dei pezzi attuale
|
||||
SaveCsvPartList()
|
||||
|
||||
' Salvo direttorio corrente
|
||||
WriteMainPrivateProfileString(S_CSV, K_CSVCURRDIR, Path.GetDirectoryName(CsvFileDlg.FileName))
|
||||
' Apertura file
|
||||
Dim sPath = CsvFileDlg.FileName
|
||||
' se necessario cambio estensione del file
|
||||
If String.Compare(Path.GetExtension(sPath), ".CSV", True) = 0 Then
|
||||
LoadCsvFile(sPath)
|
||||
Else
|
||||
@@ -77,6 +87,93 @@ Module CsvM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function CreateListOfDeniedFiles() As List(Of String)
|
||||
Dim LocalList As New List(Of String)
|
||||
LocalList.Add("MERGE")
|
||||
Dim Index1 As Integer = 0
|
||||
Dim Index2 As Integer = 0
|
||||
For Index1 = 0 To m_CsvPartList.Count - 1
|
||||
Dim sFileName As String = m_CsvPartList(Index1).m_sPath
|
||||
sFileName = Path.GetFileNameWithoutExtension(sFileName).ToUpper.Trim()
|
||||
Dim bNewFile As Boolean = True
|
||||
For Index2 = 0 To LocalList.Count - 1
|
||||
If sFileName = LocalList(Index2) Then
|
||||
bNewFile = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bNewFile Then
|
||||
LocalList.Add(Path.GetFileNameWithoutExtension(sFileName).ToUpper.Trim)
|
||||
End If
|
||||
Next
|
||||
Return LocalList
|
||||
End Function
|
||||
|
||||
Private Function LoadCsvFile(sCsvPath As String) As Boolean
|
||||
Dim bFull = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.CSV_AUTO) And
|
||||
(GetMainPrivateProfileInt(S_CSV, K_FULL, 1) <> 0)
|
||||
' aggiungo i pezzi su una lista temporanea
|
||||
Dim LocalPartList As New List(Of CsvPart)
|
||||
' Eseguo la lettura del file Csv
|
||||
If Not ReadCsvFile(sCsvPath, LocalPartList) Then
|
||||
'Errore nella lettura del file CSV
|
||||
MessageBox.Show(EgtMsg(91206), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return False
|
||||
End If
|
||||
|
||||
' Creo un nuovo file che ospitarà il merge de
|
||||
Dim sNewMergeFile As String = Path.GetDirectoryName(m_sCsvPath) & "\Merge.csv"
|
||||
m_sCsvPath = sNewMergeFile
|
||||
m_sFilePath = m_sCsvPath
|
||||
|
||||
' Elimino pezzi nulli
|
||||
RemoveWrongParts(LocalPartList)
|
||||
' Aggiorno
|
||||
If bFull Then
|
||||
MySaveCsvPartList(LocalPartList)
|
||||
' Salvo come epl
|
||||
SaveCsvPartList()
|
||||
' Rinomino file originale
|
||||
Dim sBakPath As String = sCsvPath & ".bak"
|
||||
Dim sBakName As String = Path.GetFileName(sBakPath)
|
||||
' cancello eventuale vecchio backup
|
||||
If My.Computer.FileSystem.FileExists(sBakPath) Then
|
||||
My.Computer.FileSystem.DeleteFile(sBakPath)
|
||||
End If
|
||||
' eseguo rinomina
|
||||
My.Computer.FileSystem.RenameFile(sCsvPath, sBakName)
|
||||
End If
|
||||
' attacco i nuovi pezzi alla lista corrente
|
||||
For Each Item As CsvPart In LocalPartList
|
||||
m_CsvPartList.Add(Item)
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub LoadCsvPartList(sFile As String)
|
||||
Dim bFull = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.CSV_AUTO) And
|
||||
(GetMainPrivateProfileInt(S_CSV, K_FULL, 1) <> 0)
|
||||
' Se Csv semplificato non va letta
|
||||
If Not bFull Then Return
|
||||
|
||||
' aggiungo i pezzi su una lista temporanea
|
||||
Dim LocalPartList As New List(Of CsvPart)
|
||||
|
||||
' Lettura del file
|
||||
If ReadCsvPartList(sFile, LocalPartList) Then
|
||||
' Creo un nuovo file che ospitarà il merge de
|
||||
Dim sNewMergeFile As String = Path.GetDirectoryName(m_sCsvPath) & "\Merge.csv"
|
||||
m_sCsvPath = sNewMergeFile
|
||||
m_sFilePath = m_sCsvPath
|
||||
End If
|
||||
' Elimino pezzi nulli
|
||||
RemoveWrongParts(LocalPartList)
|
||||
' attacco i nuovi pezzi alla lista corrente
|
||||
For Each Item As CsvPart In LocalPartList
|
||||
m_CsvPartList.Add(Item)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub Insert()
|
||||
' Recupero lo spessore della lastra corrente
|
||||
Dim dRawHeight As Double = EstCalc.GetRawHeight()
|
||||
@@ -88,7 +185,7 @@ Module CsvM
|
||||
End If
|
||||
' Recupero la tolleranza sullo spessore
|
||||
Dim dToler As Double = GetMainPrivateProfileDouble(S_CSV, K_THICKTOLERANCE, 100 * EPS_SMALL)
|
||||
dToler = Math.Max( dToler, 100 * EPS_SMALL)
|
||||
dToler = Math.Max(dToler, 100 * EPS_SMALL)
|
||||
' Creo la lista dei pezzi inseribili nella lastra corrente
|
||||
Dim InsPartList As New List(Of CsvPart)
|
||||
For i As Integer = 1 To m_CsvPartList.Count()
|
||||
@@ -174,25 +271,46 @@ Module CsvM
|
||||
If Not bMaxDimOnX Then
|
||||
Dim dH As Double = Math.Min(0.1 * dDimY, 30)
|
||||
Dim nText As Integer = EgtCreateTextAdv(nRegId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
||||
EgtSetColor(nText, New Color3d( 0, 0, 0))
|
||||
EgtSetColor(nText, New Color3d(0, 0, 0))
|
||||
End If
|
||||
' Aggiusto per lavorazioni
|
||||
AdjustFlatPart(nId)
|
||||
' Aggiungo info su CSV di origine
|
||||
EgtSetInfo(nId, INFO_CSV_PATH, m_sCsvPath)
|
||||
EgtSetInfo(nId, INFO_CSV_PATH, CurrPart.m_sPath)
|
||||
EgtSetInfo(nId, INFO_CSV_PART, CurrPart.m_sName)
|
||||
EgtSetInfo(nId, INFO_CSV_ORD, CurrPart.m_sOrd)
|
||||
EgtSetInfo(nId, INFO_CSV_DIST, CurrPart.m_sDist)
|
||||
EgtSetInfo(nId, INFO_CSV_MAT, CurrPart.m_sMaterial)
|
||||
' Imposto colore testi
|
||||
EstCalc.SetTextColor( nRegId)
|
||||
EstCalc.SetTextColor(nRegId)
|
||||
' Lo sposto nel gruppo speciale
|
||||
EgtRelocate(nId, nIpGrp)
|
||||
|
||||
' assegno l'identificatico del pezzo, se esiste
|
||||
If Not String.IsNullOrEmpty(CurrPart.m_sRefGuid) Then
|
||||
' GuidCode dovrebbe contenere 36 caratteri, il precode 5: tot = 41
|
||||
If CurrPart.m_sRefGuid.Count <= 36 Then
|
||||
Dim sPreGuid As String = CreatePreGuidCode(CurrPart.m_nId)
|
||||
CurrPart.m_sRefGuid = sPreGuid & CurrPart.m_sRefGuid
|
||||
End If
|
||||
EgtSetInfo(CurrPart.m_nId, INFO_REFGROUP, CurrPart.m_sRefGuid)
|
||||
End If
|
||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(CurrPart.m_nId, NAME_REGION)
|
||||
' Imposto il colore del pezzo inserito nel progetto
|
||||
EgtSetColor(nRegLayId, CurrPart.m_cColor)
|
||||
Dim EntId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||
While EntId <> GDB_ID.NULL
|
||||
If EgtGetType(EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, CurrPart.m_cColor)
|
||||
EntId = EgtGetNext(EntId)
|
||||
End While
|
||||
|
||||
Next
|
||||
EgtLuaResetGlobVar("CMP")
|
||||
EgtLuaResetGlobVar("CMP_Draw")
|
||||
' Provo ad inserire i pezzi
|
||||
Dim bDirect As Boolean = (GetMainPrivateProfileInt(S_CSV, K_CSVDIRECT, 1) <> 0)
|
||||
Dim bFull = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.CSV_AUTO) And
|
||||
(GetMainPrivateProfileInt(S_CSV, K_FULL, 1) <> 0)
|
||||
Dim bDirect As Boolean = bFull And (GetMainPrivateProfileInt(S_CSV, K_CSVDIRECT, 1) <> 0)
|
||||
For i As Integer = 1 To InsPartList.Count()
|
||||
Dim CurrPart As CsvPart = InsPartList(i - 1)
|
||||
While CurrPart.m_nToNest > 0
|
||||
@@ -229,7 +347,7 @@ Module CsvM
|
||||
EgtErase(nId2)
|
||||
Return False
|
||||
End If
|
||||
' altrimenti lo metto in parcheggio
|
||||
' altrimenti lo metto in parcheggio
|
||||
Else
|
||||
' Aggiungo riferimento e lo inserisco in VeinMatching
|
||||
VeinMatching.SetRefOnPart(nId2)
|
||||
@@ -270,11 +388,11 @@ Module CsvM
|
||||
Dim sName As String = String.Empty
|
||||
EgtGetInfo(nId, INFO_CSV_PART, sName)
|
||||
' Verifico che il pezzo appartenga a questo Csv
|
||||
If String.Compare(sCsvPath, m_sCsvPath, True) = 0 Then
|
||||
If SearchCurrCSV(sCsvPath) Then
|
||||
' Cerco il pezzo nella lista dei pezzi
|
||||
For i = 1 To m_CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||
If String.Compare(sName, CurrPart.m_sName, True) = 0 Then
|
||||
If String.Compare(sName, CurrPart.m_sName, True) = 0 And String.Compare(sCsvPath, CurrPart.m_sPath, True) = 0 Then
|
||||
' Se era nel grezzo
|
||||
If EgtGetParent(nId) = EstCalc.GetRawId() Then
|
||||
' Rimuovo le lavorazioni
|
||||
@@ -282,12 +400,19 @@ Module CsvM
|
||||
' Rimuovo dal grezzo
|
||||
EgtRemovePartFromRawPart(nId)
|
||||
End If
|
||||
' recupero il Guid del pezzo corrente (potrebbe essere stato modificato a causa di rotazioni quando il pezzo è passato in parcheggio)
|
||||
Dim sCurrRefGuid As String = String.Empty
|
||||
EgtGetInfo(nId, INFO_REFGROUP, sCurrRefGuid)
|
||||
' Eventuale cancellazione per VM
|
||||
VeinMatching.OnRemovePart(nId)
|
||||
' Cancello il pezzo
|
||||
EgtErase(nId)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio (se sRefGroup<>"")
|
||||
EstCalc.CountPartInFamily(sCurrRefGuid)
|
||||
' Aggiorno il contatore
|
||||
CurrPart.m_nToNest += 1
|
||||
' ricreo la lista delle famiglie di pezzi presenti in parcheggio
|
||||
GetFamilyGroupInPark()
|
||||
' Esco
|
||||
Return True
|
||||
End If
|
||||
@@ -297,10 +422,19 @@ Module CsvM
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function LoadCsvFile(sCsvPath As String) As Boolean
|
||||
Private Function SearchCurrCSV(ByVal sCSVFile As String) As Boolean
|
||||
For i As Integer = 1 To m_CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||
If String.Compare(sCSVFile, CurrPart.m_sPath, True) = 0 Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function ReadCsvFile(sCsvPath As String, ByRef LocalCsvPartList As List(Of CsvPart)) As Boolean
|
||||
' Pulisco path e lista dei pezzi Csv
|
||||
m_sCsvPath = String.Empty
|
||||
m_CsvPartList.Clear()
|
||||
' Definizione variabili
|
||||
EgtLuaCreateGlobTable("CSV")
|
||||
EgtLuaSetGlobStringVar("CSV.FILE", sCsvPath)
|
||||
@@ -308,7 +442,10 @@ Module CsvM
|
||||
Dim nErr As Integer = 999
|
||||
Dim sReader As String = String.Empty
|
||||
GetMainPrivateProfileString(S_CSV, K_READER, "CsvRead.lua", sReader)
|
||||
If EgtLuaExecFile(OmagOFFICEMap.refMainWindowVM.MainWindowM.sCsvAutoDir & "\" & sReader) AndAlso
|
||||
Dim bFull = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.CSV_AUTO) And
|
||||
(GetMainPrivateProfileInt(S_CSV, K_FULL, 1) <> 0)
|
||||
Dim sLuaScript As String = OmagOFFICEMap.refMainWindowVM.MainWindowM.sCsvAutoDir & If(bFull, "\" & sReader, "\CsvSimplRead.lua")
|
||||
If EgtLuaExecFile(sLuaScript) AndAlso
|
||||
EgtLuaCallFunction("CSV.Read") Then
|
||||
' Verifica stato di errore
|
||||
EgtLuaGetGlobIntVar("CSV.ERR", nErr)
|
||||
@@ -325,6 +462,7 @@ Module CsvM
|
||||
For i As Integer = 1 To nNbr
|
||||
Dim OnePart As New CsvPart
|
||||
Dim sN As String = i.ToString()
|
||||
OnePart.m_sPath = sCsvPath
|
||||
EgtLuaGetGlobStringVar("CSV.NAME" & sN, OnePart.m_sName)
|
||||
OnePart.m_bActive = True
|
||||
EgtLuaGetGlobStringVar("CSV.ORD" & sN, OnePart.m_sOrd)
|
||||
@@ -336,63 +474,50 @@ Module CsvM
|
||||
EgtLuaGetGlobNumVar("CSV.DIMX" & sN, OnePart.m_dDimX)
|
||||
EgtLuaGetGlobNumVar("CSV.DIMY" & sN, OnePart.m_dDimY)
|
||||
EgtLuaGetGlobNumVar("CSV.TH" & sN, OnePart.m_dTh)
|
||||
EgtLuaGetGlobNumVar("CSV.A1_" & sN, OnePart.m_dAng1)
|
||||
EgtLuaGetGlobNumVar("CSV.H1_" & sN, OnePart.m_dHeel1)
|
||||
EgtLuaGetGlobNumVar("CSV.A2_" & sN, OnePart.m_dAng2)
|
||||
EgtLuaGetGlobNumVar("CSV.H2_" & sN, OnePart.m_dHeel2)
|
||||
EgtLuaGetGlobNumVar("CSV.A3_" & sN, OnePart.m_dAng3)
|
||||
EgtLuaGetGlobNumVar("CSV.H3_" & sN, OnePart.m_dHeel3)
|
||||
EgtLuaGetGlobNumVar("CSV.A4_" & sN, OnePart.m_dAng4)
|
||||
EgtLuaGetGlobNumVar("CSV.H4_" & sN, OnePart.m_dHeel4)
|
||||
OnePart.m_nOriInd = i
|
||||
If OnePart.m_nCount > 1 Then
|
||||
OnePart.m_sRefGuid = System.Guid.NewGuid.ToString
|
||||
End If
|
||||
' inserisco in lista
|
||||
m_CsvPartList.Add(OnePart)
|
||||
LocalCsvPartList.Add(OnePart)
|
||||
Next
|
||||
EgtLuaResetGlobVar("CSV")
|
||||
' Ordinamento lista dei pezzi (ordine crescente su materiale e spessore)
|
||||
m_CsvPartList.Sort(Function(x, y)
|
||||
Dim nComp As Integer = String.Compare(x.m_sMaterial, y.m_sMaterial, True)
|
||||
If nComp = 0 Then
|
||||
If Math.Abs(x.m_dTh - y.m_dTh) < EPS_SMALL Then
|
||||
Return (x.m_nOriInd - y.m_nOriInd)
|
||||
LocalCsvPartList.Sort(Function(x, y)
|
||||
Dim nComp As Integer = String.Compare(x.m_sMaterial, y.m_sMaterial, True)
|
||||
If nComp = 0 Then
|
||||
If Math.Abs(x.m_dTh - y.m_dTh) < EPS_SMALL Then
|
||||
Return (x.m_nOriInd - y.m_nOriInd)
|
||||
Else
|
||||
Return CInt(Math.Ceiling(x.m_dTh - y.m_dTh))
|
||||
End If
|
||||
Else
|
||||
Return CInt(Math.Ceiling(x.m_dTh - y.m_dTh))
|
||||
Return nComp
|
||||
End If
|
||||
Else
|
||||
Return nComp
|
||||
End If
|
||||
End Function)
|
||||
' Salvo come epl
|
||||
m_bCsvPartListModified = True
|
||||
SaveCsvPartList()
|
||||
' Rinomino file originale
|
||||
Dim sBakPath As String = sCsvPath & ".bak"
|
||||
Dim sBakName As String = Path.GetFileName(sBakPath)
|
||||
' cancello eventuale vecchio backup
|
||||
If My.Computer.FileSystem.FileExists(sBakPath) Then
|
||||
My.Computer.FileSystem.DeleteFile(sBakPath)
|
||||
End If
|
||||
' eseguo rinomina
|
||||
My.Computer.FileSystem.RenameFile(sCsvPath, sBakName)
|
||||
End Function)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Function SaveCsvPartList() As Boolean
|
||||
' Se non c'è nulla di attivo, non faccio alcunché
|
||||
If String.IsNullOrEmpty(m_sCsvPath) Then
|
||||
EgtOutLog("CSV List Save Skipped : missing")
|
||||
Return True
|
||||
End If
|
||||
' Se lista non modificata, non faccio alcunchhé
|
||||
If Not m_bCsvPartListModified Then
|
||||
EgtOutLog("CSV List Save Skipped : not modified")
|
||||
Return True
|
||||
End If
|
||||
' Path del file
|
||||
Dim sFile As String = Path.ChangeExtension(m_sCsvPath, ".epl")
|
||||
' Gestione file
|
||||
Public Function WriteCsvPartList(sFile As String, sCsvPath As String, LocalCsvPartList As List(Of CsvPart)) As Boolean
|
||||
Try
|
||||
' Apro file
|
||||
Dim Writer As New IO.StreamWriter(sFile, False)
|
||||
' Intestazione
|
||||
Writer.WriteLine("[General]")
|
||||
Writer.WriteLine("Path=" & m_sCsvPath)
|
||||
Writer.WriteLine("Path=" & sCsvPath)
|
||||
' Ciclo sui pezzi
|
||||
For i As Integer = 1 To m_CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||
For i As Integer = 1 To LocalCsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = LocalCsvPartList(i - 1)
|
||||
Writer.WriteLine("[P" & i.ToString() & "]")
|
||||
Writer.WriteLine("Path=" & CurrPart.m_sPath)
|
||||
Writer.WriteLine("Nam=" & CurrPart.m_sName)
|
||||
Writer.WriteLine("Ord=" & CurrPart.m_sOrd)
|
||||
Writer.WriteLine("Dist=" & CurrPart.m_sDist)
|
||||
@@ -405,7 +530,16 @@ Module CsvM
|
||||
Writer.WriteLine("DX=" & DoubleToString(CurrPart.m_dDimX, 4))
|
||||
Writer.WriteLine("DY=" & DoubleToString(CurrPart.m_dDimY, 4))
|
||||
Writer.WriteLine("Th=" & DoubleToString(CurrPart.m_dTh, 4))
|
||||
Writer.WriteLine("A1=" & DoubleToString(CurrPart.m_dAng1, 4))
|
||||
Writer.WriteLine("H1=" & DoubleToString(CurrPart.m_dHeel1, 4))
|
||||
Writer.WriteLine("A2=" & DoubleToString(CurrPart.m_dAng2, 4))
|
||||
Writer.WriteLine("H2=" & DoubleToString(CurrPart.m_dHeel2, 4))
|
||||
Writer.WriteLine("A3=" & DoubleToString(CurrPart.m_dAng3, 4))
|
||||
Writer.WriteLine("H3=" & DoubleToString(CurrPart.m_dHeel3, 4))
|
||||
Writer.WriteLine("A4=" & DoubleToString(CurrPart.m_dAng4, 4))
|
||||
Writer.WriteLine("H4=" & DoubleToString(CurrPart.m_dHeel4, 4))
|
||||
Writer.WriteLine("OIn=" & CurrPart.m_nOriInd.ToString())
|
||||
Writer.WriteLine("Guid=" & CurrPart.m_sRefGuid)
|
||||
Next
|
||||
' Terminatore
|
||||
Writer.WriteLine("[END]")
|
||||
@@ -416,18 +550,80 @@ Module CsvM
|
||||
' Registro in ini path
|
||||
WriteMainPrivateProfileString(S_CSV, K_CSVLASTFILE, sFile)
|
||||
Return True
|
||||
' Errore
|
||||
' Errore
|
||||
Catch ex As Exception
|
||||
EgtOutLog("CSV List error writing " & sFile)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function LoadCsvPartList(sFile As String) As Boolean
|
||||
' Pulisco path e lista dei pezzi Csv
|
||||
m_sCsvPath = String.Empty
|
||||
m_CsvPartList.Clear()
|
||||
' Gestione file
|
||||
' dato l'elenco completo dei file salvo ogni singolo epl
|
||||
Friend Function WriteCsvMergePartList(CsvPartList As List(Of CsvPart)) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim LocalPartList As New List(Of CsvPart)
|
||||
Dim Index As Integer = 0
|
||||
' devo dividere la lista in tante parti quanti sono i file che lo costituiscono
|
||||
While Index < CsvPartList.Count
|
||||
Dim CurrFile As String = CsvPartList(Index).m_sPath
|
||||
Dim sFile As String = Path.ChangeExtension(CurrFile, ".epl")
|
||||
LocalPartList.Clear()
|
||||
While CurrFile = CsvPartList(Index).m_sPath
|
||||
LocalPartList.Add(CsvPartList(Index))
|
||||
Index += 1
|
||||
' se terminata la lista
|
||||
If Index = CsvPartList.Count Then
|
||||
Exit While
|
||||
End If
|
||||
End While
|
||||
' salvo l'elenco corrente
|
||||
bOk = WriteCsvPartList(sFile, CurrFile, LocalPartList) And bOk
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Sub SaveCsvPartList()
|
||||
Dim bFull = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.CSV_AUTO) And
|
||||
(GetMainPrivateProfileInt(S_CSV, K_FULL, 1) <> 0)
|
||||
' Se Csv semplificato non va salvata
|
||||
If Not bFull Then Return
|
||||
' Se non c'è nulla di attivo, non faccio alcunché
|
||||
If String.IsNullOrEmpty(m_sCsvPath) Then
|
||||
EgtOutLog("CSV List missing")
|
||||
Return
|
||||
End If
|
||||
' Path del file
|
||||
Dim sFile As String = Path.ChangeExtension(m_sFilePath, ".epl")
|
||||
' Scrittura dei file
|
||||
If WriteCsvMergePartList(m_CsvPartList) Then
|
||||
' Scrittura dei file Merge
|
||||
If WriteCsvPartList(sFile, m_sCsvPath, m_CsvPartList) Then
|
||||
WriteMainPrivateProfileString(S_CSV, K_CSVLASTFILE, sFile)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub MySaveCsvPartList(ByVal CurrPartList As List(Of CsvPart))
|
||||
Dim bFull = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.CSV_AUTO) And
|
||||
(GetMainPrivateProfileInt(S_CSV, K_FULL, 1) <> 0)
|
||||
' Se Csv semplificato non va salvata
|
||||
If Not bFull Then Return
|
||||
Dim sCurrPath As String = String.Empty
|
||||
' recupero dalla lista il nome del file corrente
|
||||
For Each Item As CsvPart In CurrPartList
|
||||
sCurrPath = Item.m_sPath
|
||||
Next
|
||||
' se non trov il nome del file assocciato all'elenco di pezzi esco
|
||||
If String.IsNullOrEmpty(sCurrPath) Then
|
||||
EgtOutLog("CSV Curr list missing")
|
||||
Return
|
||||
End If
|
||||
' Path del file
|
||||
Dim sFile As String = Path.ChangeExtension(sCurrPath, ".epl")
|
||||
' Scrittura del file
|
||||
WriteCsvPartList(sFile, sCurrPath, CurrPartList)
|
||||
End Sub
|
||||
|
||||
Private Function ReadCsvPartList(sFile As String, LocalCsvPartList As List(Of CsvPart)) As Boolean
|
||||
Try
|
||||
' Apro file
|
||||
Dim Reader As New IO.StreamReader(sFile, False)
|
||||
@@ -456,7 +652,7 @@ Module CsvM
|
||||
' se esiste pezzo precedente, lo salvo
|
||||
If nI > 1 Then
|
||||
' inserisco in lista
|
||||
m_CsvPartList.Add(OnePart)
|
||||
LocalCsvPartList.Add(OnePart)
|
||||
End If
|
||||
' predisposizioni per prossimo pezzo
|
||||
nI += 1
|
||||
@@ -466,7 +662,9 @@ Module CsvM
|
||||
Else
|
||||
Dim sItems() As String = sLine.Split("=".ToCharArray)
|
||||
If sItems.Count() >= 2 Then
|
||||
If sItems(0) = "Nam" Then
|
||||
If sItems(0) = "Path" Then
|
||||
OnePart.m_sPath = sItems(1)
|
||||
ElseIf sItems(0) = "Nam" Then
|
||||
OnePart.m_sName = sItems(1)
|
||||
ElseIf sItems(0) = "Ord" Then
|
||||
OnePart.m_sOrd = sItems(1)
|
||||
@@ -490,8 +688,26 @@ Module CsvM
|
||||
StringToDouble(sItems(1), OnePart.m_dDimY)
|
||||
ElseIf sItems(0) = "Th" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dTh)
|
||||
ElseIf sItems(0) = "A1" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng1)
|
||||
ElseIf sItems(0) = "H1" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel1)
|
||||
ElseIf sItems(0) = "A2" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng2)
|
||||
ElseIf sItems(0) = "H2" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel2)
|
||||
ElseIf sItems(0) = "A3" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng3)
|
||||
ElseIf sItems(0) = "H3" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel3)
|
||||
ElseIf sItems(0) = "A4" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng4)
|
||||
ElseIf sItems(0) = "H4" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel4)
|
||||
ElseIf sItems(0) = "OIn" Then
|
||||
StringToInt(sItems(1), OnePart.m_nOriInd)
|
||||
ElseIf sItems(0) = "Guid" Then
|
||||
OnePart.m_sRefGuid = sItems(1).Trim
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -502,18 +718,37 @@ Module CsvM
|
||||
' Dichiaro lista non modificata
|
||||
m_bCsvPartListModified = False
|
||||
Return True
|
||||
' Errore
|
||||
' Errore
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error reading " & sFile)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Friend Function RemoveNotToNestParts(ByRef CsvPartList As List(Of CsvPart)) As Boolean
|
||||
For i As Integer = CsvPartList.Count() - 1 To 0 Step -1
|
||||
If CsvPartList(i).m_nToNest = 0 Then
|
||||
CsvPartList.RemoveAt(i)
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function RemoveWrongParts(ByRef CsvPartList As List(Of CsvPart)) As Boolean
|
||||
For i As Integer = CsvPartList.Count() - 1 To 0 Step -1
|
||||
If Not CsvPartList(i).m_bIsRect Or CsvPartList(i).m_dDimX < EPS_SMALL Or CsvPartList(i).m_dDimY < EPS_SMALL Then
|
||||
CsvPartList.RemoveAt(i)
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Module
|
||||
|
||||
Public Class CsvPart
|
||||
Public m_sPath As String = String.Empty
|
||||
Public m_sName As String = String.Empty
|
||||
Public m_sOrd As String = String.Empty
|
||||
Public m_sDist As String = String.Empty
|
||||
@@ -526,6 +761,18 @@ Public Class CsvPart
|
||||
Public m_dDimX As Double = 0
|
||||
Public m_dDimY As Double = 0
|
||||
Public m_dTh As Double = 0
|
||||
Public m_dAng1 As Double = 0
|
||||
Public m_dHeel1 As Double = 0
|
||||
Public m_dAng2 As Double = 0
|
||||
Public m_dHeel2 As Double = 0
|
||||
Public m_dAng3 As Double = 0
|
||||
Public m_dHeel3 As Double = 0
|
||||
Public m_dAng4 As Double = 0
|
||||
Public m_dHeel4 As Double = 0
|
||||
Public m_nOriInd As Integer = 0
|
||||
Public m_nId As Integer = GDB_ID.NULL
|
||||
' definsco il riferimento al gruppo
|
||||
Public m_sRefGuid As String = System.Guid.NewGuid.ToString
|
||||
' definisco il colore del gruppo che sto inserendo
|
||||
Public m_cColor As Color3d = CompoColor(IniFile.m_sIniFile)
|
||||
End Class
|
||||
|
||||
@@ -107,6 +107,7 @@ Public Module CurrentMachine
|
||||
|
||||
' Variabili che contengono il nome degli utensili disponibili per tipo
|
||||
Private m_sCurrSaw As String = String.Empty
|
||||
Private m_sCurrSawTilted As String = String.Empty
|
||||
Private m_sCurrDrill As String = String.Empty
|
||||
Private m_sCurrMill As String = String.Empty
|
||||
Private m_sCurrMillNoTip As String = String.Empty
|
||||
@@ -116,6 +117,7 @@ Public Module CurrentMachine
|
||||
|
||||
' Variabili che contengono le lavorazioni correntemente attive (utilizzate per definire lavorazioni nel programma)
|
||||
Private m_sCurrSawing As String = String.Empty
|
||||
Private m_sCurrSawingTilted As String = String.Empty
|
||||
Private m_sCurrDrilling As String = String.Empty
|
||||
Private m_sCurrMilling As String = String.Empty
|
||||
Private m_sCurrPocketing As String = String.Empty
|
||||
@@ -731,6 +733,18 @@ Friend Property sCurrMillNoTip As String
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrSawingTilted As String
|
||||
Get
|
||||
Return m_sCurrSawingTilted
|
||||
End Get
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWINGTILTED, value, sMachIniFile) Then
|
||||
m_sCurrSawingTilted = value
|
||||
'm_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrDrilling As String
|
||||
Get
|
||||
Return m_sCurrDrilling
|
||||
@@ -1270,6 +1284,13 @@ Friend Property sCurrMillNoTip As String
|
||||
' Leggo utensili correnti
|
||||
' lama
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAW, Nothing, m_sCurrSaw, sMachIniFile)
|
||||
' lama inclinata
|
||||
If m_nShowToolChanger = 4 Then
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWTILTED, Nothing, m_sCurrSawTilted, sMachIniFile)
|
||||
Else
|
||||
' se non è configurato il cambio utensile e allora imposto l'unica lama disponibile per i tagli inclinati
|
||||
m_sCurrSawTilted = m_sCurrSaw
|
||||
End If
|
||||
' foretto
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILL, Nothing, m_sCurrDrill, sMachIniFile)
|
||||
' fresa
|
||||
@@ -1286,6 +1307,8 @@ Friend Property sCurrMillNoTip As String
|
||||
' Leggo lavorazioni correnti
|
||||
' lama
|
||||
m_sCurrSawing = EstCalc.GetCurrSawing()
|
||||
' lama inlicnata
|
||||
m_sCurrSawingTilted = EstCalc.GetCurrSawingTilted()
|
||||
' foretto
|
||||
m_sCurrDrilling = EstCalc.GetCurrDrilling()
|
||||
' fresa
|
||||
@@ -1415,6 +1438,16 @@ Friend Property sCurrMillNoTip As String
|
||||
OmagOFFICEMap.refMachinePanelVM.NotifyPropertyChanged(NameOf(OmagOFFICEMap.refMachinePanelVM.WjDb_Visibility))
|
||||
End Sub
|
||||
|
||||
' recupro dalla lista delle macchine l'oggetto associato al nome indicato
|
||||
Public Sub GetMachineClass(sMachineName As String)
|
||||
For Each Item In OmagOFFICEMap.refMachinePanelVM.MachineList
|
||||
If string.Compare(Item.Name, sMachineName, True) = 0 Then
|
||||
OmagOFFICEMap.refMachinePanelVM.SelectedMachine = Item
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||
Dim TempCurrMat As Material = CurrMat
|
||||
' Svuoto l'attuale lista di materiali e delle qualità
|
||||
|
||||
@@ -51,6 +51,68 @@ Module EstCalc
|
||||
End If
|
||||
End Function
|
||||
|
||||
#Region "PreGuidCode"
|
||||
|
||||
' recupero i primi 5 caratteri della stringa
|
||||
Friend Function GetPreGuidCode(sGuidCode As String) As String
|
||||
If sGuidCode.Count > 5 Then
|
||||
Return sGuidCode(0) & sGuidCode(1) & sGuidCode(2) & sGuidCode(3) & sGuidCode(4)
|
||||
End If
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
' sostituisce i primi 5 caratteri della stringa con qualle passata
|
||||
Friend Function UppDateGuidCode(ByRef sGuidCode As String, sPreGuidCode As String) As Boolean
|
||||
If sPreGuidCode.Count = 5 Then
|
||||
sGuidCode = sGuidCode.Remove(0, 5)
|
||||
sGuidCode = sPreGuidCode & sGuidCode
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' restituisce 5 caratteri
|
||||
Friend Function CreatePreGuidCode(nId As Integer) As String
|
||||
' recupero il frame dell'oggetto
|
||||
Dim frGlobFrame As New Frame3d
|
||||
If Not EgtGetGroupGlobFrame(nId, frGlobFrame) Then
|
||||
Return String.Empty
|
||||
End If
|
||||
' recupero il suo versore
|
||||
Dim vtX As Vector3d = frGlobFrame.VersX
|
||||
Dim Len As Double
|
||||
Dim AngV As Double
|
||||
Dim AngH As Double
|
||||
vtX.ToSpherical(Len, AngV, AngH)
|
||||
' costruisco il codice (6 caratteri!) che identifica la posizione del pezzo in parcheggio
|
||||
Dim sPreGuid As String = GetDirectionCode(AngH)
|
||||
Return sPreGuid
|
||||
End Function
|
||||
|
||||
Friend Function GetDirectionCode(dVal As Double) As String
|
||||
Dim bIsNegative As Boolean = False
|
||||
If dVal < 0 Then
|
||||
dVal = dVal + (-1)
|
||||
bIsNegative = True
|
||||
End If
|
||||
Dim sVal As String = DoubleToString(dVal * 1000, 0)
|
||||
Dim nCount As Integer = sVal.Count
|
||||
For Index As Integer = 1 To 4 - nCount
|
||||
sVal = "0" & sVal
|
||||
Next
|
||||
Dim vVal As Char() = {"+"c, "1"c, "0"c, "0"c, "0"c}
|
||||
If bIsNegative Then
|
||||
vVal = {"-"c, sVal(0), sVal(1), sVal(2), sVal(3)}
|
||||
Else
|
||||
vVal = {"+"c, sVal(0), sVal(1), sVal(2), sVal(3)}
|
||||
End If
|
||||
' ricostruisco la stringa dotata di segno
|
||||
sVal = vVal(0) & vVal(1) & vVal(2) & vVal(3) & vVal(4)
|
||||
Return sVal
|
||||
End Function
|
||||
|
||||
#End Region ' PreGiudCode
|
||||
|
||||
'--------------------------------------------------------------------------------------------------
|
||||
Private m_nRawId As Integer = GDB_ID.NULL
|
||||
Public Function GetRawId() As Integer
|
||||
@@ -185,7 +247,7 @@ Module EstCalc
|
||||
Friend Function SetCurrSawing(sCurrSawing As String) As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return False
|
||||
Return EgtSetInfo(nOperId, INFO_CURRSAWING, sCurrSawing)
|
||||
Return EgtSetInfo(nOperId, INFO_CURRSAWING, sCurrSawing, True)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrSawing() As String
|
||||
@@ -196,10 +258,18 @@ Module EstCalc
|
||||
Return sCurrSawing
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrSawingTilted() As String
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return ""
|
||||
Dim sCurrSawing As String = String.Empty
|
||||
EgtGetInfo(nOperId, INFO_CURRSAWING, sCurrSawing)
|
||||
Return sCurrSawing
|
||||
End Function
|
||||
|
||||
Friend Function SetCurrMilling(sCurrMilling As String) As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return False
|
||||
Return EgtSetInfo(nOperId, INFO_CURRMILLING, sCurrMilling)
|
||||
Return EgtSetInfo(nOperId, INFO_CURRMILLING, sCurrMilling, True)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrMilling() As String
|
||||
@@ -213,7 +283,7 @@ Module EstCalc
|
||||
Friend Function SetCurrDrilling(sCurrDrilling As String) As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return False
|
||||
Return EgtSetInfo(nOperId, INFO_CURRDRILLING, sCurrDrilling)
|
||||
Return EgtSetInfo(nOperId, INFO_CURRDRILLING, sCurrDrilling, True)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrDrilling() As String
|
||||
@@ -227,7 +297,7 @@ Module EstCalc
|
||||
Friend Function SetCurrPocketing(sCurrMilling As String) As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return False
|
||||
Return EgtSetInfo(nOperId, INFO_CURRPOCKETING, sCurrMilling)
|
||||
Return EgtSetInfo(nOperId, INFO_CURRPOCKETING, sCurrMilling, True)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrPocketing() As String
|
||||
@@ -241,7 +311,7 @@ Module EstCalc
|
||||
Friend Function SetCurrWaterjetting(sCurrMilling As String) As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
|
||||
If nOperId = GDB_ID.NULL Then Return False
|
||||
Return EgtSetInfo(nOperId, INFO_CURRWATERJETTING, sCurrMilling)
|
||||
Return EgtSetInfo(nOperId, INFO_CURRWATERJETTING, sCurrMilling, True)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrWaterjetting() As String
|
||||
@@ -270,7 +340,7 @@ Module EstCalc
|
||||
Return (nFlag <> 0)
|
||||
End Function
|
||||
|
||||
Public Function AdjustAdditionalTable() As Boolean
|
||||
Public Function AdjustAdditionalTable(Optional bForced As Boolean = False) As Boolean
|
||||
' Recupero altezza sottotavola corrente
|
||||
Dim nFixtId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), MACH_FIXT_GROUP)
|
||||
Dim nAddTabId As Integer = EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE)
|
||||
@@ -281,18 +351,27 @@ Module EstCalc
|
||||
dCurrAddTab = b3AddTab.DimZ()
|
||||
End If
|
||||
' Se valore cambiato, aggiorno...
|
||||
Dim dDeltaZ As Double = dAdditionalTable - dCurrAddTab
|
||||
If Math.Abs(dDeltaZ) > EPS_SMALL Then
|
||||
Dim dDeltaZ As Double = CurrentMachine.dAdditionalTable - dCurrAddTab
|
||||
Dim bChanged As Boolean = (Math.Abs(dDeltaZ) > EPS_SMALL)
|
||||
If bChanged Or bForced Then
|
||||
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||
If Not bChanged AndAlso bOldEnMod Then EgtDisableModified()
|
||||
AddAdditionalTable()
|
||||
UpdateAllRawsZ(dDeltaZ)
|
||||
' !!! FOTO DA GESTIRE !!!
|
||||
'If GetPhoto() <> GDB_ID.NULL Then
|
||||
' UpdatePhoto()
|
||||
' UpdateContour()
|
||||
' If EgtGetRawPartCount() > 0 Then
|
||||
' ShowPhoto(False)
|
||||
' End If
|
||||
'End If
|
||||
If GetPhoto() <> GDB_ID.NULL Then
|
||||
UpdatePhoto()
|
||||
UpdateContour()
|
||||
If EgtGetRawPartCount() > 0 Then
|
||||
ShowPhoto(False)
|
||||
Dim nRawGrpId As Integer = EgtGetFirstRawPart()
|
||||
While nRawGrpId <> GDB_ID.NULL
|
||||
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup(nRawGrpId, NAME_RAW_SOLID)
|
||||
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName(nRawSolidId, GetPhotoName())
|
||||
nRawGrpId = EgtGetNextRawPart(nRawGrpId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
If Not bChanged AndAlso bOldEnMod Then EgtEnableModified()
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
@@ -626,6 +705,16 @@ Module EstCalc
|
||||
End If
|
||||
' Gestione risultato nesting
|
||||
If bFit Then
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
Dim sRefGroup As String = String.Empty
|
||||
If EgtGetInfo(nId, INFO_REFGROUP, sRefGroup) Then
|
||||
' spengo il layer che contiene il contatore
|
||||
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nId, INFO_COUNTERLY)
|
||||
EgtSetStatus(nCounterLayer, GDB_ST.OFF)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio
|
||||
CountPartInFamily(sRefGroup)
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
' Eventuale aggiunta solido per taglio da sotto
|
||||
UpdateSolidForDrip(nId)
|
||||
Return True
|
||||
@@ -654,60 +743,262 @@ Module EstCalc
|
||||
nLayId = EgtGetNextName(nLayId, NAME_INLOOP)
|
||||
End While
|
||||
' Aggiorno le entità con tallone e quelle con angolo esterno
|
||||
Const AGG_DEPTH As Double = 2.0
|
||||
Const AGG_DEPTH As Double = 0.75
|
||||
Dim bSizeOnTop As Boolean = (GetMainPrivateProfileInt(S_SIDES, K_SIZEALWAYSONTOP, 0) <> 0)
|
||||
For Each nEnt As Integer In vEnt
|
||||
' Se aggiornamento vietato, vado oltre
|
||||
If EgtExistsInfo( nEnt, INFO_SIDE_FIXED) Then continue for
|
||||
If EgtExistsInfo(nEnt, INFO_SIDE_FIXED) Then Continue For
|
||||
' Recupero eventuali tallone ed angolo originale
|
||||
Dim dHeel As Double = 0
|
||||
Dim dSideAng As Double = 0
|
||||
EgtGetInfo(nEnt, INFO_HEEL, dHeel)
|
||||
EgtGetInfo(nEnt, INFO_ORIG_SIDE_ANGLE, dSideAng)
|
||||
' Se inclinazione con tallone
|
||||
If Math.Abs(dSideAng) > EPS_ANG_SMALL And dHeel > 10 * EPS_SMALL Then
|
||||
' Angolo esterno
|
||||
' Inclinazione esterna
|
||||
If dSideAng > 0 Then
|
||||
' Se tallone inferiore a spessore
|
||||
If dHeel < dTh - 10 * EPS_SMALL Then
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, dSideAng)
|
||||
EgtSetInfo(nEnt, INFO_OFFSET2, -(dTh - dHeel) * Math.Tan(dSideAng * Math.PI / 180))
|
||||
If Not bSizeOnTop Then
|
||||
EgtSetInfo(nEnt, INFO_OFFSET, 0)
|
||||
EgtSetInfo(nEnt, INFO_OFFSET2, -(dTh - dHeel) * Math.Tan(dSideAng * Math.PI / 180))
|
||||
Else
|
||||
EgtSetInfo(nEnt, INFO_OFFSET, (dTh - dHeel) * Math.Tan(dSideAng * Math.PI / 180))
|
||||
EgtSetInfo(nEnt, INFO_OFFSET2, 0)
|
||||
End If
|
||||
EgtSetInfo(nEnt, INFO_DEPTH2, (dTh - dHeel) + AGG_DEPTH)
|
||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||
EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
|
||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||
Else
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
||||
EgtRemoveInfo(nEnt, INFO_OFFSET2)
|
||||
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
||||
EgtRemoveInfo(nEnt, INFO_AGG2)
|
||||
End If
|
||||
' Angolo interno
|
||||
' Inclinazione interna
|
||||
Else
|
||||
' Se tallone inferiore a spessore
|
||||
If dHeel < dTh - 10 * EPS_SMALL Then
|
||||
EgtSetInfo(nEnt, INFO_OFFSET, dHeel * Math.Tan(-dSideAng * Math.PI / 180))
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
||||
EgtSetInfo(nEnt, INFO_DEPTH2, dHeel + AGG_DEPTH)
|
||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||
EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
|
||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||
Else
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||
EgtRemoveInfo(nEnt, INFO_OFFSET)
|
||||
EgtRemoveInfo(nEnt, INFO_SIDE_ANGLE2)
|
||||
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
||||
EgtRemoveInfo(nEnt, INFO_AGG2)
|
||||
End If
|
||||
End If
|
||||
' Se altrimenti inclinazione esterna
|
||||
' Se altrimenti inclinazione esterna
|
||||
ElseIf dSideAng > EPS_ANG_SMALL Then
|
||||
EgtSetInfo(nEnt, INFO_OFFSET, -dTh * Math.Tan(dSideAng * Math.PI / 180))
|
||||
If Not bSizeOnTop Then
|
||||
EgtSetInfo(nEnt, INFO_OFFSET, -dTh * Math.Tan(dSideAng * Math.PI / 180))
|
||||
Else
|
||||
EgtSetInfo(nEnt, INFO_OFFSET, 0)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#Region "Manager Counter Part"
|
||||
|
||||
' lista delle famiglie di pezzi in parcheggio
|
||||
Public m_ListOfGroupInPark As New List(Of FamilyPart)
|
||||
' se seleniozato il layer CounterPz
|
||||
Public m_bIsCounterLy As Boolean = False
|
||||
Public m_nCurrNubrOfParts As Integer = 0
|
||||
|
||||
' creo la lista delle famiglie che popolano il parcheggio
|
||||
Public Sub GetFamilyGroupInPark()
|
||||
m_ListOfGroupInPark.Clear()
|
||||
Dim nIdInPark As Integer = EgtGetFirstPart()
|
||||
While nIdInPark <> GDB_ID.NULL
|
||||
If IsInRaw(nIdInPark) Then
|
||||
nIdInPark = EgtGetNextPart(nIdInPark)
|
||||
Continue While
|
||||
End If
|
||||
Dim sRefGroup As String = String.Empty
|
||||
If EgtGetInfo(nIdInPark, INFO_REFGROUP, sRefGroup) Then
|
||||
Dim bExists As Boolean = False
|
||||
For Each sItem As FamilyPart In m_ListOfGroupInPark
|
||||
If sRefGroup = sItem.sRefGuid Then
|
||||
bExists = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bExists Then
|
||||
m_ListOfGroupInPark.Add(New FamilyPart(sRefGroup, nIdInPark))
|
||||
End If
|
||||
End If
|
||||
nIdInPark = EgtGetNextPart(nIdInPark)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Public Sub CountPartInFamily(sRefGuid As String)
|
||||
If String.IsNullOrEmpty(sRefGuid) Then Return
|
||||
Dim nCount As Integer = 0
|
||||
Dim nIdInPark As Integer = EgtGetFirstPart()
|
||||
' conto il nuero di pezzi del gruppo inidcato
|
||||
While nIdInPark <> GDB_ID.NULL
|
||||
If IsInRaw(nIdInPark) Then
|
||||
nIdInPark = EgtGetNextPart(nIdInPark)
|
||||
Continue While
|
||||
End If
|
||||
Dim sRefGroup As String = String.Empty
|
||||
EgtGetInfo(nIdInPark, INFO_REFGROUP, sRefGroup)
|
||||
If sRefGroup = sRefGuid Then
|
||||
nCount += 1
|
||||
End If
|
||||
nIdInPark = EgtGetNextPart(nIdInPark)
|
||||
End While
|
||||
' aggiorno il contatore dei pezzi del gruppo
|
||||
nIdInPark = EgtGetFirstPart()
|
||||
While nIdInPark <> GDB_ID.NULL
|
||||
If IsInRaw(nIdInPark) Then
|
||||
nIdInPark = EgtGetNextPart(nIdInPark)
|
||||
Continue While
|
||||
End If
|
||||
Dim sRefGroup As String = String.Empty
|
||||
EgtGetInfo(nIdInPark, INFO_REFGROUP, sRefGroup)
|
||||
If sRefGroup = sRefGuid Then
|
||||
Dim nId As Integer = EgtGetFirstNameInGroup(nIdInPark, INFO_COUNTERLY)
|
||||
If nId <> GDB_ID.NULL Then
|
||||
Dim m_IdCounterTextas As Integer = EgtGetFirstInGroup(nId)
|
||||
EgtModifyText(m_IdCounterTextas, "# " & nCount.ToString)
|
||||
End If
|
||||
End If
|
||||
nIdInPark = EgtGetNextPart(nIdInPark)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Public Sub SelectPartInFaimily(sRefGuid As String, nNbrOfSelection As Integer)
|
||||
' aggiorno il contatore dei pezzi del gruppo
|
||||
Dim nIdInPark As Integer = EgtGetFirstPart()
|
||||
Dim nCounter As Integer = 0
|
||||
While nIdInPark <> GDB_ID.NULL And nCounter < nNbrOfSelection
|
||||
If IsInRaw(nIdInPark) Then
|
||||
nIdInPark = EgtGetNextPart(nIdInPark)
|
||||
Continue While
|
||||
End If
|
||||
Dim sRefGroup As String = String.Empty
|
||||
EgtGetInfo(nIdInPark, INFO_REFGROUP, sRefGroup)
|
||||
If sRefGroup = sRefGuid Then
|
||||
EgtSelectObj(nIdInPark)
|
||||
nCounter += 1
|
||||
End If
|
||||
nIdInPark = EgtGetNextPart(nIdInPark)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Public Sub DeselectPartInFaimily(sRefGuid As String)
|
||||
' aggiorno il contatore dei pezzi del gruppo
|
||||
Dim nIdInPark As Integer = EgtGetFirstPart()
|
||||
While nIdInPark <> GDB_ID.NULL
|
||||
If IsInRaw(nIdInPark) Then
|
||||
nIdInPark = EgtGetNextPart(nIdInPark)
|
||||
Continue While
|
||||
End If
|
||||
Dim sRefGroup As String = String.Empty
|
||||
EgtGetInfo(nIdInPark, INFO_REFGROUP, sRefGroup)
|
||||
If sRefGroup = sRefGuid Then
|
||||
EgtDeselectObj(nIdInPark)
|
||||
End If
|
||||
nIdInPark = EgtGetNextPart(nIdInPark)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Public Function ParkInGroupFamily(nId As Integer) As Boolean
|
||||
' se pezzo appartenente ad un gruppo
|
||||
Dim sRefGroup As String = String.Empty
|
||||
Dim Element As FamilyPart
|
||||
If EgtGetInfo(nId, INFO_REFGROUP, sRefGroup) Then
|
||||
' verifico se esiste un pezzo dello stesso gruppo in parcheggio
|
||||
Dim nNewLayer As Integer
|
||||
Dim ptMin As Point3d
|
||||
Dim ptMax As Point3d
|
||||
For Each sItem As FamilyPart In m_ListOfGroupInPark
|
||||
If sRefGroup = sItem.sRefGuid Then
|
||||
' creo un nuovo layer per contenere l'informazione del numero di pezzi da inserire
|
||||
If EgtGetFirstNameInGroup(nId, INFO_COUNTERLY) = GDB_ID.NULL Then
|
||||
nNewLayer = EgtCreateGroup(nId)
|
||||
EgtSetName(nNewLayer, INFO_COUNTERLY)
|
||||
EgtSetColor(nNewLayer, New Color3d(0, 0, 0))
|
||||
EgtGetBBox(nId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
EgtCreateText(nNewLayer, New Point3d((ptMin.x + ptMax.x) / 2, ptMin.y - sItem.nHText - 20, ptMin.z), "# ???", sItem.nHText, GDB_RT.LOC)
|
||||
Else
|
||||
' Accendo il layer che contiene il contatore
|
||||
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nId, INFO_COUNTERLY)
|
||||
EgtSetStatus(nCounterLayer, GDB_ST.ON_)
|
||||
End If
|
||||
|
||||
' calcolo lo spostamento del pezzo
|
||||
Dim PtMinInRaw As Point3d
|
||||
Dim PtMaxInRaw As Point3d
|
||||
EgtGetBBoxGlob(nId, GDB_BB.STANDARD, PtMinInRaw, PtMaxInRaw)
|
||||
Dim vtMoveToStorage As New Vector3d
|
||||
vtMoveToStorage = sItem.PtStorage() - PtMinInRaw
|
||||
EgtMove(nId, vtMoveToStorage, GDB_RT.GLOB)
|
||||
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio
|
||||
CountPartInFamily(sRefGroup)
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
' inserisco il primo pezzo del gruppo nel parcheggio
|
||||
Element = New FamilyPart(sRefGroup, nId)
|
||||
m_ListOfGroupInPark.Add(Element)
|
||||
' creo un nuovo layer per contenere l'informazione del numero di pezzi da inserire
|
||||
If EgtGetFirstNameInGroup(nId, INFO_COUNTERLY) = GDB_ID.NULL Then
|
||||
nNewLayer = EgtCreateGroup(nId)
|
||||
EgtSetName(nNewLayer, INFO_COUNTERLY)
|
||||
EgtSetColor(nNewLayer, New Color3d(0, 0, 0))
|
||||
EgtGetBBox(nId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
' posso migliorarei lposizioanamento in funzione della dimensione della scritta...
|
||||
EgtCreateText(nNewLayer, New Point3d((ptMin.x + ptMax.x) / 2, ptMin.y - Element.nHText - 20, ptMin.z), "# 1", Element.nHText, GDB_RT.LOC)
|
||||
Else
|
||||
' Accendo il layer che contiene il contatore
|
||||
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nId, INFO_COUNTERLY)
|
||||
EgtSetStatus(nCounterLayer, GDB_ST.ON_)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio
|
||||
CountPartInFamily(sRefGroup)
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' verifico se il pezzo ha un gruppo che contiene le informazioni per il taglio
|
||||
Public Function IsInRaw(nIdGroup As Integer) As Boolean
|
||||
' verifico che il pezzo sia veramente uin parcheggio
|
||||
Dim nPV As Integer = EgtGetFirstNameInGroup(nIdGroup, "PV")
|
||||
If nPV <> GDB_ID.NULL Then
|
||||
' verifico che non ci siano delle lavorazioni
|
||||
If EgtGetFirstInGroup(nPV) <> GDB_ID.NULL Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
#End Region ' Manager Counter Part
|
||||
|
||||
Public Function StoreOnePart(ByVal nId As Integer, Optional ByVal bForced As Boolean = False) As Boolean
|
||||
' Se pezzo in grezzo, metto in parcheggio (sempre possibile)
|
||||
If bForced OrElse
|
||||
(m_nRawId <> GDB_ID.NULL AndAlso EgtGetParent(nId) = m_nRawId) Then
|
||||
' Ripristino lo stato originale
|
||||
PreRemoveOnePart( nId)
|
||||
PreRemoveOnePart(nId)
|
||||
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
' se esiste almento un pezzo del gruppo in parcheggio esco
|
||||
If ParkInGroupFamily(nId) Then Return True
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
|
||||
' Parcheggio
|
||||
PackPartInStore(nId)
|
||||
' Aggiusto la posizione in Z
|
||||
@@ -730,9 +1021,24 @@ Module EstCalc
|
||||
' Parcheggio
|
||||
Const STORE_LARGH As Double = 6000
|
||||
Const STORE_DIST As Double = 200
|
||||
Const STORE_OFFS As Double = 20
|
||||
Dim dStXmin As Double = b3Tab.Min().x - 0.5 * (STORE_LARGH - b3Tab.DimX())
|
||||
Return EgtPackBox(nId, dStXmin, -INFINITO, dStXmin + STORE_LARGH, b3Tab.Min().y - STORE_DIST, STORE_OFFS, False)
|
||||
' 40 il Font usato per indicare il numero di pezzi in parcheggio "# N"
|
||||
Const STORE_OFFS As Double = 20 + 40 + 20
|
||||
Dim dStoreLarg As Double = GetPrivateProfileDouble("Store", "StoreLargh", STORE_LARGH, CurrentMachine.sMachIniFile)
|
||||
Dim dStoreDist As Double = GetPrivateProfileDouble("Store", "StoreDist", STORE_DIST, CurrentMachine.sMachIniFile)
|
||||
Dim dStoreOffs As Double = GetPrivateProfileDouble("Store", "StoreOffs", STORE_OFFS, CurrentMachine.sMachIniFile)
|
||||
Dim dStXmin As Double = b3Tab.Min().x - 0.5 * (dStoreLarg - b3Tab.DimX())
|
||||
|
||||
' Verifico che il pezzo ha una posizione salvata
|
||||
Dim ptCenter As Point3d
|
||||
If EgtGetInfo(nId, "PosInPark", ptCenter) Then
|
||||
Dim ptCurrPos As Point3d
|
||||
EgtCenterPoint(nId, GDB_ID.ROOT, ptCurrPos)
|
||||
Dim vt As New Vector3d(ptCenter - ptCurrPos)
|
||||
EgtMove(nId, vt, GDB_RT.GLOB)
|
||||
Return True
|
||||
End If
|
||||
|
||||
Return EgtPackBox(nId, dStXmin, -INFINITO, dStXmin + dStoreLarg, b3Tab.Min().y - dStoreDist, dStoreOffs, False)
|
||||
End Function
|
||||
|
||||
Friend Function VerifyPartsNesting(bReducedCut As Boolean) As Boolean
|
||||
@@ -831,3 +1137,4 @@ Module EstCalc
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ Module EstPhoto
|
||||
' Recupero le dimensioni della tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
If Not EgtGetTableArea(1, b3Tab) Then Return False
|
||||
b3Tab.Expand(100, 100, 0)
|
||||
b3Tab.Expand(1000, 1000, 0)
|
||||
' Elimino eventuale precedente foto
|
||||
Dim nOldPhotoId = GetPhoto()
|
||||
If nOldPhotoId <> GDB_ID.NULL Then EgtErase(nOldPhotoId)
|
||||
@@ -428,7 +428,9 @@ Module EstPhoto
|
||||
Dim nNewPhotoId As Integer = EgtAddPhoto2(GetPhotoName(), sPath, ptOri, ptCen, dDimX, dDimY, nPhGrpId, ptMin, ptMax)
|
||||
If nNewPhotoId = GDB_ID.NULL Then Return False
|
||||
' Eseguo eventuale rotazione attorno all'origine
|
||||
EgtRotatePhoto(nNewPhotoId, ptOri, Vector3d.Z_AX(), dRot)
|
||||
If Math.Abs( dRot) > EPS_ANG_ZERO then
|
||||
EgtRotatePhoto(nNewPhotoId, ptOri, Vector3d.Z_AX(), dRot)
|
||||
End If
|
||||
' Salvo gli offset
|
||||
EgtSetInfo(nNewPhotoId, "OffsX", dOffsetX)
|
||||
EgtSetInfo(nNewPhotoId, "OffsY", dOffsetY)
|
||||
|
||||
@@ -92,11 +92,12 @@ Public Module SplitAuto
|
||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
Dim nEntId, nSub As Integer
|
||||
If EgtGetMachiningGeometry( 0, nEntId, nSub) Then
|
||||
If EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse EgtGetType( nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
@@ -383,28 +384,53 @@ Public Module SplitAuto
|
||||
For Each nCut As Integer In vCuts
|
||||
RemoveMachiningPreview(nCut)
|
||||
Next
|
||||
' Sposto tutte le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
||||
' ---------------------------------- LAVORAZIONI ----------------------------------
|
||||
ChangeOperationPhase(nNewPhase)
|
||||
' ---------------------------------- LAVORAZIONI ----------------------------------
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Sub ChangeOperationPhase(nNewPhase As Integer)
|
||||
' creo l'elenco delle lavorazioni che devono essere sposate
|
||||
Dim MchList As New List(Of Integer)
|
||||
' Recupero le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
||||
Dim nId = EgtGetFirstOperation()
|
||||
While nId <> GDB_ID.NULL
|
||||
Dim nNextId = EgtGetNextOperation(nId)
|
||||
If IsValidMachining(nId) And EgtGetOperationPhase(nId) = nNewPhase - 1 And EgtExistsInfo(nId, INFO_MCH_USER_OFF) Then
|
||||
' sposto la lavorazione
|
||||
EgtChangeOperationPhase(nId, nNewPhase)
|
||||
' Provo ad inserire la lavorazione nell'elenco
|
||||
AddMach(MchList, nId)
|
||||
' sposto le inglobate
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId2 In sItems
|
||||
For Each sId2 As String In sItems
|
||||
Dim nId2 As Integer = 0
|
||||
StringToInt(sId2, nId2)
|
||||
If nId2 > 0 Then EgtChangeOperationPhase(nId2, nNewPhase)
|
||||
If nId2 > 0 Then
|
||||
' Provo ad inserire la lavorazione nell'elenco
|
||||
AddMach(MchList, nId2)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nId = nNextId
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
' Procedo ora a spostare le lavorazioni nella nuova disposizione
|
||||
For Each ItemMchId As Integer In MchList
|
||||
EgtChangeOperationPhase(ItemMchId, nNewPhase)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' Inserisce gli inidici delle lavorazioni evitando di inserire dei doppioni
|
||||
Private Sub AddMach(MchList As List(Of Integer), IdMch As Integer)
|
||||
For Each Item As Integer In MchList
|
||||
If IdMch = Item Then
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
MchList.Add(IdMch)
|
||||
End Sub
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Friend Function CalculateSplitAuto() As Boolean
|
||||
|
||||
@@ -8,7 +8,24 @@ Module VacuumCups
|
||||
Private m_nVacId As Integer = GDB_ID.NULL
|
||||
Private m_nRefId As Integer = GDB_ID.NULL
|
||||
Private m_dPreferredRot As Double = 0
|
||||
Private m_dPrefVertRotXMinus As Double = 0
|
||||
Private m_dPrefVertRotXPlus As Double = 0
|
||||
Private m_dPrefVertRotYMinus As Double = 0
|
||||
Private m_dPrefVertRotYPlus As Double = 0
|
||||
Private m_dDripRefAng As Double = 0
|
||||
' dati carico massimo manipolatore
|
||||
Private m_RawDensity As Double = 2500
|
||||
Private m_RawWeight As Double = 0
|
||||
Private m_MaxWeightSinglePlugger As Double = 250
|
||||
Private m_MaxWeightDoublePlugger As Double = 750
|
||||
Public bOverWeight As Boolean = False
|
||||
' dati per rotazione ventose vicono al fine corsa Y e X
|
||||
Private bRotateVacuumNearExtraStrokeY As Boolean = False
|
||||
Private bRotateVacuumNearExtraStrokeX As Boolean = False
|
||||
' dati stroke
|
||||
Public bExtraStroke As Boolean = False
|
||||
Public ptStartPointLift As Point3d
|
||||
Public dDegRotStartAng As Double
|
||||
|
||||
' Nome del gruppo temporaneo per le ventose
|
||||
Private Const VACTMP_GRP As String = "VacTmp"
|
||||
@@ -48,6 +65,20 @@ Module VacuumCups
|
||||
Return m_nVacType
|
||||
End Function
|
||||
|
||||
Friend Sub GetWeightInformation(Density As Double, MaxSingle As Double, MaxDouble As Double)
|
||||
m_RawDensity = Density
|
||||
m_MaxWeightSinglePlugger = MaxSingle
|
||||
m_MaxWeightDoublePlugger = MaxDouble
|
||||
End Sub
|
||||
|
||||
Friend Sub GetRotationForExtraStrokeY(Rotate As Boolean)
|
||||
bRotateVacuumNearExtraStrokeY = Rotate
|
||||
End Sub
|
||||
|
||||
Friend Sub GetRotationForExtraStrokeX(Rotate As Boolean)
|
||||
bRotateVacuumNearExtraStrokeX = Rotate
|
||||
End Sub
|
||||
|
||||
Friend Function GetVacuumId() As Integer
|
||||
Return m_nVacId
|
||||
End Function
|
||||
@@ -64,6 +95,8 @@ Module VacuumCups
|
||||
' Identificativo riferimento della testa nella macchina
|
||||
Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT)
|
||||
If nT1Id = GDB_ID.NULL Then Return False
|
||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
' Creo gruppo temporaneo in cui copiarli
|
||||
m_nTempId = EgtCreateGroup(GDB_ID.ROOT)
|
||||
If m_nTempId = GDB_ID.NULL Then Return False
|
||||
@@ -73,7 +106,12 @@ Module VacuumCups
|
||||
m_nVacId = EgtCopyGlob(nLayId, m_nTempId)
|
||||
If m_nVacId = GDB_ID.NULL Then Return False
|
||||
' Angolo di rotazione preferito
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
||||
' Angoli di rotazione preferiti per ventosa in verticale (lungo Y) a sinistra e a destra del centro tavola
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXPLUS, m_dPrefVertRotXPlus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYMINUS, m_dPrefVertRotYMinus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYPLUS, m_dPrefVertRotYPlus)
|
||||
' Direzione di riferimento per tagli Drip
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
|
||||
' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose
|
||||
@@ -160,6 +198,18 @@ Module VacuumCups
|
||||
EgtGetBBoxGlob(nRKerfId, GDB_BB.STANDARD, b3Kerf)
|
||||
Dim ptKerfCen As Point3d
|
||||
EgtCentroid(nRKerfId, GDB_ID.ROOT, ptKerfCen)
|
||||
|
||||
'-------------------- INIZIO CALCOLO PESO --------------------
|
||||
' recupero l'area del grezzo da muovere
|
||||
Dim RawArea As Double = 0
|
||||
' superficie del grezzo senza considerare eventuali fori
|
||||
EgtSurfFrGrossArea(nRKerfId, RawArea)
|
||||
' volume calcolato in mmc
|
||||
Dim RawVolume As Double = RawArea * b3Raw.DimZ()
|
||||
' peso calolato in kg
|
||||
m_RawWeight = RawVolume * m_RawDensity / Math.Pow(10, 9)
|
||||
'-------------------- FINE CALCOLO PESO --------------------
|
||||
|
||||
' Eseguo ricerca
|
||||
If FindVacuumCupsOnRaw(nRawId, ptRawCen, b3Kerf, ptKerfCen, nKerfId, nRKerfId, rmData) Then
|
||||
Return True
|
||||
@@ -261,6 +311,7 @@ Module VacuumCups
|
||||
Dim sCups() As String = Nothing
|
||||
Dim sCups2() As String = Nothing
|
||||
If Not GetVacuumCupSelection(nI, sCups, sCups2) Then Return False
|
||||
bExtraStroke = False
|
||||
' Determino validità soluzioni della configurazione
|
||||
Dim vtMove As New Vector3d
|
||||
Dim ptRotCen As New Point3d
|
||||
@@ -363,6 +414,26 @@ Module VacuumCups
|
||||
If b3Vac.IsEmpty() Then Return INFINITO
|
||||
' Se box maggiore di quello del pezzo, scarto soluzione
|
||||
If b3Vac.Radius() > b3Raw.Radius() Then Return INFINITO
|
||||
'-------------------- INIZIO VERIFICA PESO --------------------
|
||||
bOverWeight = False
|
||||
Select Case GetPluggerFromCameras(sCups)
|
||||
Case 2
|
||||
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
||||
If m_RawWeight > m_MaxWeightDoublePlugger Then
|
||||
bOverWeight = True
|
||||
Return INFINITO
|
||||
End If
|
||||
Case 1
|
||||
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
||||
If m_RawWeight > m_MaxWeightSinglePlugger Then
|
||||
bOverWeight = True
|
||||
Return INFINITO
|
||||
End If
|
||||
End Select
|
||||
'-------------------- FINE VERIFICA PESO --------------------
|
||||
' Recupero l'area della tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
' Determino il movimento
|
||||
vtMove = ptRawCen - b3Vac.Center()
|
||||
b3Vac.Move(vtMove)
|
||||
@@ -373,12 +444,27 @@ Module VacuumCups
|
||||
Dim dLen, dAngVertDeg, dAngOrizzDeg As Double
|
||||
frMinRect.VersX().ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||
dRotAngDeg = dAngOrizzDeg
|
||||
Dim dPreferredRot As Double = m_dPreferredRot
|
||||
If bRotateVacuumNearExtraStrokeX And Not IsHorizontal(dAngOrizzDeg) Then
|
||||
If frMinRect.Orig().x < b3Tab.Center().x Then
|
||||
dPreferredRot = m_dPrefVertRotXMinus
|
||||
Else
|
||||
dPreferredRot = m_dPrefVertRotXPlus
|
||||
End If
|
||||
ElseIf bRotateVacuumNearExtraStrokeY And IsHorizontal(dAngOrizzDeg) Then
|
||||
' se l'orientemanto è orizzontale e la macchina è stata abilitata
|
||||
If frMinRect.Orig().y < b3Tab.Center().y Then
|
||||
dPreferredRot = m_dPrefVertRotYPlus
|
||||
Else
|
||||
dPreferredRot = m_dPrefVertRotYMinus
|
||||
End If
|
||||
End If
|
||||
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
|
||||
Dim dAngDelta As Double = If( Math.Abs( b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
||||
While dRotAngDeg - m_dPreferredRot >= dAngDelta / 2
|
||||
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
||||
dRotAngDeg -= dAngDelta
|
||||
End While
|
||||
While dRotAngDeg - m_dPreferredRot <= -dAngDelta / 2
|
||||
While dRotAngDeg - dPreferredRot <= -dAngDelta / 2
|
||||
dRotAngDeg += dAngDelta
|
||||
End While
|
||||
Else
|
||||
@@ -430,13 +516,71 @@ Module VacuumCups
|
||||
' Applico movimento e rotazione al punto
|
||||
ptRef.Move(vtMove)
|
||||
ptRef.Rotate(ptRotCen, Vector3d.Z_AX(), dRotAngDeg)
|
||||
' -------------- INIZIO verifica di essere nel limite delle corse macchina --------------
|
||||
If VerifyOutOfStrokes(ptRef, dRotAngDeg) <> 0 Then
|
||||
bExtraStroke = True
|
||||
Return INFINITO
|
||||
End If
|
||||
' se la posizione è accettbaile allora salvo i dati
|
||||
ptStartPointLift = ptRef
|
||||
dDegRotStartAng = dRotAngDeg
|
||||
' -------------- FINE verifica di essere nel limite delle corse macchina --------------
|
||||
' Ne calcolo la distanza dal centro della tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim dDist As Double = Point3d.DistXY(ptRef, b3Tab.Center())
|
||||
Return dDist
|
||||
End Function
|
||||
|
||||
Private Function IsHorizontal(dDegAng As Double) As Boolean
|
||||
If (Math.Abs(dDegAng) > 45 And Math.Abs(dDegAng) < 135) Or (Math.Abs(dDegAng) > 225 And Math.Abs(dDegAng) < 315) Then
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' assegante le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||
' Posizione Home dell'asse rotante
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
' Corse dell'asse
|
||||
Dim dCMin As Double
|
||||
EgtGetAxisMin("C", dCMin)
|
||||
Dim dCMax As Double
|
||||
EgtGetAxisMax("C", dCMax)
|
||||
' Porto l'angolo nel range
|
||||
Dim dRotAngMachDeg As Double = dRotAngDeg + dCHome
|
||||
AdjustAngleInRange(dRotAngMachDeg, dCMin, dCMax)
|
||||
' Imposto la ventosa come fosse un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
' Calcolo gli assi macchina
|
||||
Dim dX, dY, dZ As Double
|
||||
Dim nStat As Integer
|
||||
EgtGetCalcPositions(ptRef, dRotAngMachDeg, 0, nStat, dX, dY, dZ)
|
||||
' Verifico le corse
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngMachDeg, 0, nStat)
|
||||
Return nStat
|
||||
End Function
|
||||
|
||||
' dall'informazione di extra corsa recupera il valore indicato
|
||||
Public Function GetExtraStrokeValue(sInfo As String) As Double
|
||||
Dim dExtraStroke As Double = 0
|
||||
Dim sItems As String() = sInfo.Split("="c)
|
||||
If sItems.Count = 2 Then
|
||||
Dim nStartIndex As Integer = 0
|
||||
For Each ItemChar As Char In sItems(1)
|
||||
If ItemChar = "("c Then
|
||||
Exit For
|
||||
End If
|
||||
nStartIndex += 1
|
||||
Next
|
||||
If nStartIndex > 0 Then
|
||||
Dim sValue As String = sItems(1).Remove(nStartIndex, sItems(1).Count - nStartIndex)
|
||||
StringToLen(sValue, dExtraStroke)
|
||||
End If
|
||||
End If
|
||||
Return dExtraStroke
|
||||
End Function
|
||||
|
||||
Private Function TestVacuumCups(nCups() As Integer, nRawRegId As Integer,
|
||||
vtMove As Vector3d, ptRotCen As Point3d, dRotAngDeg As Double) As Boolean
|
||||
' Eseguo verifica delle ventose rispetto al grezzo
|
||||
@@ -457,6 +601,27 @@ Module VacuumCups
|
||||
Return bVacOk
|
||||
End Function
|
||||
|
||||
Private Function GetPluggerFromCameras(sCups() As String) As Integer
|
||||
Dim nCountPlunger As Integer = 1
|
||||
Dim bPlugger1 As Boolean = False
|
||||
Dim bPlugger2 As Boolean = False
|
||||
For Each Camera As String In sCups
|
||||
If (Camera.Contains("1") Or Camera.Contains("2") Or Camera.Contains("3")) Then
|
||||
bPlugger1 = True
|
||||
Else
|
||||
bPlugger2 = True
|
||||
End If
|
||||
Next
|
||||
' verifico quali sono le camere attive
|
||||
If bPlugger1 And bPlugger2 Then
|
||||
nCountPlunger = 2
|
||||
ElseIf Not bPlugger1 And Not bPlugger2 Then
|
||||
nCountPlunger = 0
|
||||
End If
|
||||
' restituisco il numero di Plugger in uso
|
||||
Return nCountPlunger
|
||||
End Function
|
||||
|
||||
Friend Function SaveOneMoveInfo(nId As Integer, rmData As RawMoveData) As Boolean
|
||||
' Assegno le informazioni
|
||||
EgtSetInfo(nId, "Id", rmData.m_nId)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Window x:Class="VeinMatchingWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Height="500" Width="500" ShowInTaskbar="False" Initialized="Window_Initialized" MinWidth="300" MinHeight="300">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Height="500" Width="500" ShowInTaskbar="False" Initialized="Window_Initialized" MinWidth="300" MinHeight="300">
|
||||
|
||||
<Grid Name="VeinMatchingGrid" Background="{StaticResource Omag_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -11,20 +11,16 @@
|
||||
|
||||
<StackPanel Orientation="Vertical">
|
||||
<ToggleButton Name="ShowTextBtn" Height="40" Width="80"
|
||||
Margin="0,5,0,0"
|
||||
Content="ShowText"/>
|
||||
Margin="0,5,0,0"/>
|
||||
<ToggleButton Name="EditBtn" Height="40" Width="80"
|
||||
Margin="0,5,0,0"
|
||||
Content="Edit"/>
|
||||
Margin="0,5,0,0"/>
|
||||
<ToggleButton Name="VerifyBtn" Height="40" Width="80"
|
||||
Margin="0,5,0,0"
|
||||
Content="Verify"/>
|
||||
Margin="0,5,0,0"/>
|
||||
<ToggleButton Name="MagneticBtn" Height="40" Width="80"
|
||||
Margin="0,5,0,0"
|
||||
Content="Magnetic"/>
|
||||
Visibility="Collapsed"
|
||||
Margin="0,5,0,0"/>
|
||||
<Button Name="ExportBtn" Height="40" Width="80"
|
||||
Margin="0,5,0,0"
|
||||
Content="Export"/>
|
||||
Margin="0,5,0,0"/>
|
||||
<Button Name="AssemblyBtn" Height="40" Width="80"
|
||||
Margin="0,5,0,0"
|
||||
Content="3D"/>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Imports System.IO
|
||||
Imports System.Windows.Interop
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports OmagOFFICE.VeinMatchingWindow
|
||||
|
||||
Public Class VeinMatchingWindow
|
||||
|
||||
@@ -29,6 +29,18 @@ Public Class VeinMatchingWindow
|
||||
Private m_locPrev As System.Drawing.Point
|
||||
Private m_ptPrev As Point3d
|
||||
Private m_ptCen As Point3d
|
||||
' Gestione rotazione pezzi in fase di Drag
|
||||
Private m_bKeyCtrlPressed As Boolean = False
|
||||
Private m_bKeyLeftShiftPressed As Boolean = False
|
||||
Private m_dAngTotal As Double = 0
|
||||
Private m_dStartAng As Double = 0
|
||||
Private m_bStartRot As Boolean = False
|
||||
Private m_bStartMove As Boolean = False
|
||||
|
||||
Enum ALETTE
|
||||
F = 2
|
||||
A = 1
|
||||
End Enum
|
||||
|
||||
Private Sub Window_Initialized(sender As Object, e As EventArgs)
|
||||
' Assegnazione scena all'host e posizionamento nella PlacePageGrid
|
||||
@@ -38,11 +50,11 @@ Public Class VeinMatchingWindow
|
||||
' Per non farla visualizzare alla creazione
|
||||
Me.Left = 32000
|
||||
' Assegno messaggi
|
||||
ExportBtn.Content = EgtMsg(MSG_VEINMATCHING + 1) ' Esporta
|
||||
ShowTextBtn.Content = EgtMsg(MSG_VEINMATCHING + 2) ' Mostra Info
|
||||
EditBtn.Content = EgtMsg(MSG_VEINMATCHING + 3) ' Modifica
|
||||
VerifyBtn.Content = EgtMsg(MSG_VEINMATCHING + 4) ' Verifica
|
||||
MagneticBtn.Content = EgtMsg(MSG_VEINMATCHING + 5) ' Magnetico
|
||||
ExportBtn.Content = EgtMsg(91601) ' Esporta
|
||||
ShowTextBtn.Content = EgtMsg(91609) ' Mostra Info
|
||||
EditBtn.Content = EgtMsg(91610) ' Modifica
|
||||
VerifyBtn.Content = EgtMsg(91611) ' Verifica
|
||||
MagneticBtn.Content = EgtMsg(91612) ' Magnetico
|
||||
End Sub
|
||||
|
||||
Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -249,14 +261,14 @@ Public Class VeinMatchingWindow
|
||||
EgtMovePartToSnapPointOnCollision(nMoveId, True, m_dSnapDist, bSnapMoved)
|
||||
End If
|
||||
End If
|
||||
' Standard
|
||||
' Standard
|
||||
Else
|
||||
EgtMove(nMoveId, vtMove)
|
||||
End If
|
||||
VeinMatching.SetProjectModified()
|
||||
EgtDraw()
|
||||
End If
|
||||
' altrimenti rotazione
|
||||
' altrimenti rotazione
|
||||
Else
|
||||
' Ricavo l'angolo di movimento
|
||||
Dim vtPrev As Vector3d = m_ptPrev - m_ptCen
|
||||
@@ -266,7 +278,7 @@ Public Class VeinMatchingWindow
|
||||
' Con verifica di collisione
|
||||
If m_bCurrVerify Then
|
||||
EgtRotatePart(nMoveId, True, m_ptCen, dAngRotDeg)
|
||||
' Standard
|
||||
' Standard
|
||||
Else
|
||||
EgtRotate(nMoveId, m_ptCen, Vector3d.Z_AX(), dAngRotDeg, GDB_RT.GLOB)
|
||||
End If
|
||||
@@ -286,15 +298,15 @@ Public Class VeinMatchingWindow
|
||||
' Se eseguito drag
|
||||
If Not m_bDragToStart Then
|
||||
' Non serve fare alcunché
|
||||
' Se selezione da eseguire
|
||||
' Se selezione da eseguire
|
||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||
' Eseguo la selezione
|
||||
EgtSelectObj(m_nIdToSel)
|
||||
' Se deselezione da eseguire
|
||||
' Se deselezione da eseguire
|
||||
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
|
||||
EgtDeselectObj(m_nIdToDesel)
|
||||
End If
|
||||
' Altrimenti selezione/deselezione anche per nesting
|
||||
' Altrimenti selezione/deselezione anche per nesting
|
||||
Else
|
||||
' Se selezione da eseguire
|
||||
If m_nIdToSel <> GDB_ID.NULL Then
|
||||
@@ -322,7 +334,7 @@ Public Class VeinMatchingWindow
|
||||
EgtSetCurrentContext(VeinMatchingScene.GetCtx())
|
||||
' Se selezione riuscita, la eseguo anche in VME
|
||||
If bSelected Then EgtSelectObj(m_nIdToSel)
|
||||
' Se deselezione da eseguire
|
||||
' Se deselezione da eseguire
|
||||
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
|
||||
' Eseguo la deselezione in Nesting
|
||||
Dim bDeselected As Boolean = False
|
||||
@@ -500,31 +512,31 @@ Friend Module VeinMatching
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
While PartId <> GDB_ID.NULL
|
||||
Dim b3Tmp As New BBox3d()
|
||||
if EgtGetBBoxGlob( PartId, GDB_BB.STANDARD, b3Tmp) Then b3Parts.Add( b3Tmp)
|
||||
If EgtGetBBoxGlob(PartId, GDB_BB.STANDARD, b3Tmp) Then b3Parts.Add(b3Tmp)
|
||||
PartId = EgtGetNextPart(PartId)
|
||||
End While
|
||||
' Se ingombro troppo grande, errore
|
||||
If b3Parts.DimX() > 2 * ( DIM_REG - SAFE_DIST) Or b3Parts.DimY() > 2 * ( DIM_REG - SAFE_DIST) Then
|
||||
If b3Parts.DimX() > 2 * (DIM_REG - SAFE_DIST) Or b3Parts.DimY() > 2 * (DIM_REG - SAFE_DIST) Then
|
||||
Return False
|
||||
End If
|
||||
' Se fuori dalla regione di validità, li muovo
|
||||
Dim vtMove As New Vector3d
|
||||
If b3Parts.Min().x < -DIM_REG + SAFE_DIST Then
|
||||
vtMove += New Vector3d( -DIM_REG + SAFE_DIST - b3Parts.Min().x, 0, 0)
|
||||
End If
|
||||
vtMove += New Vector3d(-DIM_REG + SAFE_DIST - b3Parts.Min().x, 0, 0)
|
||||
End If
|
||||
If b3Parts.Min().y < -DIM_REG + SAFE_DIST Then
|
||||
vtMove += New Vector3d( 0, -DIM_REG + SAFE_DIST - b3Parts.Min().y, 0)
|
||||
End If
|
||||
vtMove += New Vector3d(0, -DIM_REG + SAFE_DIST - b3Parts.Min().y, 0)
|
||||
End If
|
||||
If b3Parts.Max().x > DIM_REG - SAFE_DIST Then
|
||||
vtMove += New Vector3d( DIM_REG - SAFE_DIST - b3Parts.Max().x, 0, 0)
|
||||
End If
|
||||
vtMove += New Vector3d(DIM_REG - SAFE_DIST - b3Parts.Max().x, 0, 0)
|
||||
End If
|
||||
If b3Parts.Max().y > DIM_REG - SAFE_DIST Then
|
||||
vtMove += New Vector3d( 0, DIM_REG - SAFE_DIST - b3Parts.Max().y, 0)
|
||||
End If
|
||||
vtMove += New Vector3d(0, DIM_REG - SAFE_DIST - b3Parts.Max().y, 0)
|
||||
End If
|
||||
If Not vtMove.IsSmall() Then
|
||||
PartId = EgtGetFirstPart()
|
||||
While PartId <> GDB_ID.NULL
|
||||
EgtMove( PartId, vtMove, GDB_RT.GLOB)
|
||||
EgtMove(PartId, vtMove, GDB_RT.GLOB)
|
||||
PartId = EgtGetNextPart(PartId)
|
||||
End While
|
||||
End If
|
||||
@@ -573,9 +585,9 @@ Friend Module VeinMatching
|
||||
EgtSetInfo(nVeinId2, KEY_ORI_ID, nPartId)
|
||||
' Ne garantisco la visibilità
|
||||
Dim nStat As Integer = GDB_ST.OFF
|
||||
If Not EgtGetStatus( nVeinId2, nStat) OrElse nStat <> GDB_ST.ON_ Then
|
||||
EgtSetStatus( nVeinId2, GDB_ST.ON_)
|
||||
End If
|
||||
If Not EgtGetStatus(nVeinId2, nStat) OrElse nStat <> GDB_ST.ON_ Then
|
||||
EgtSetStatus(nVeinId2, GDB_ST.ON_)
|
||||
End If
|
||||
' Se impostato, nascondo scritte, sono nel layer "Region"
|
||||
If Not m_bShowText Then
|
||||
Dim nVeinRegId As Integer = EgtGetFirstNameInGroup(nVeinId2, NAME_REGION)
|
||||
@@ -984,7 +996,8 @@ Friend Module VeinMatching
|
||||
' Esporto il file come immagine
|
||||
EgtSetCurrentContext(m_nVeinCtx)
|
||||
Dim bOk As Boolean = (EgtGetFileType(sFilePath) = FT.IMG)
|
||||
bOk = bOk AndAlso EgtGetImage(EgtGetShowMode(), New Color3d(255, 255, 255), New Color3d(255, 255, 255),
|
||||
bOk = bOk AndAlso EgtGetImage(DirectCast(EgtGetShowMode(), EgtInterface.SM),
|
||||
New Color3d(255, 255, 255), New Color3d(255, 255, 255),
|
||||
m_nImgWidth, m_nImgHeight, sFilePath)
|
||||
' Ripristino il contesto originale
|
||||
EgtSetCurrentContext(nMainCtx)
|
||||
@@ -1071,7 +1084,7 @@ Friend Module VeinMatching
|
||||
Return (GetVeinPartId(nPartId) <> GDB_ID.NULL)
|
||||
End Function
|
||||
|
||||
Friend Function ModifyPartText( nPartId As Integer, sNewText As String, Optional bDraw As Boolean = True) As Boolean
|
||||
Friend Function ModifyPartText(nPartId As Integer, sNewText As String, Optional bDraw As Boolean = True) As Boolean
|
||||
' Verifico esista il contesto del VeinMatching
|
||||
If m_nVeinCtx = 0 Then Return True
|
||||
' Recupero il contesto corrente (principale)
|
||||
@@ -1089,7 +1102,7 @@ Friend Module VeinMatching
|
||||
Dim nCurrId As Integer = EgtGetFirstInGroup(nVeinRegId)
|
||||
While nCurrId <> GDB_ID.NULL
|
||||
If EgtGetType(nCurrId) = GDB_TY.EXT_TEXT Then
|
||||
EgtModifyText( nCurrId, sNewText)
|
||||
EgtModifyText(nCurrId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nCurrId = EgtGetNext(nCurrId)
|
||||
@@ -1705,43 +1718,44 @@ Friend Module VeinMatching
|
||||
End Function
|
||||
|
||||
Friend Function MoveAlettaSolid(ByRef Item As Aletta, ByRef ThicknessRaw As Double) As Boolean
|
||||
|
||||
' A: alzatina, F: frontalino
|
||||
Dim nType As Integer
|
||||
If Not EgtGetInfo(Item.IdSideRef, "AF", nType) Then Return False
|
||||
|
||||
Dim ptSRef, ptERef, ptE As Point3d
|
||||
Dim ptSRef, ptERef, ptS, ptE As Point3d
|
||||
' Piano cucina
|
||||
If Not EgtStartPoint(Item.IdSideRef, GDB_ID.ROOT, ptSRef) Then Return False
|
||||
If Not EgtEndPoint(Item.IdSideRef, GDB_ID.ROOT, ptERef) Then Return False
|
||||
' AlzFront
|
||||
If Not EgtStartPoint(Item.SideId, GDB_ID.ROOT, ptS) Then Return False
|
||||
If Not EgtEndPoint(Item.SideId, GDB_ID.ROOT, ptE) Then Return False
|
||||
|
||||
' verifco che sia già stato ruotato
|
||||
Dim nInfo3D As Integer = 0
|
||||
EgtGetInfo(Item.SideId, "Info3D", nInfo3D)
|
||||
' vettore lato cucina
|
||||
Dim vtRotRef As Vector3d = ptERef - ptSRef
|
||||
' vettore lato AlzFront
|
||||
Dim vtRot As Vector3d = ptE - ptS
|
||||
|
||||
If nInfo3D <> 1 Then
|
||||
' ruoto il solido intorno al lato di riferimento
|
||||
Dim vtRot As Vector3d = ptERef - ptSRef
|
||||
If nType = 1 Then
|
||||
EgtRotate(Item.PartId, ptE, vtRot, -90, GDB_RT.GLOB)
|
||||
ElseIf nType = 2 Then
|
||||
EgtRotate(Item.PartId, ptE, vtRot, 90, GDB_RT.GLOB)
|
||||
End If
|
||||
' ruoto il solido intorno al lato di riferimento
|
||||
If nType = ALETTE.A Then
|
||||
EgtRotate(Item.PartId, ptE, vtRot, 90, GDB_RT.GLOB)
|
||||
ElseIf nType = ALETTE.F Then
|
||||
EgtRotate(Item.PartId, ptE, vtRot, -90, GDB_RT.GLOB)
|
||||
End If
|
||||
|
||||
' punto di riferimento per la traslazione sul solido
|
||||
Dim ptSolid As Point3d
|
||||
If nType = 1 Then
|
||||
If nType = ALETTE.A Then
|
||||
' cerco id della curva che definisce la front face
|
||||
Dim nSolidGrp As Integer = EgtGetFirstNameInGroup(Item.PartId, NAME_VM_SOLID)
|
||||
Dim nFrontCrvId As Integer = EgtGetFirstInGroup(nSolidGrp)
|
||||
EgtStartPoint(nFrontCrvId, ptSolid)
|
||||
ElseIf nType = 2 Then
|
||||
EgtStartPoint(Item.SideId, ptSolid)
|
||||
EgtStartPoint(nFrontCrvId, GDB_ID.ROOT, ptSolid)
|
||||
ElseIf nType = ALETTE.F Then
|
||||
EgtStartPoint(Item.SideId, GDB_ID.ROOT, ptSolid)
|
||||
End If
|
||||
|
||||
Dim ItemFrame As New Frame3d
|
||||
If Not EgtGetGroupGlobFrame(Item.PartId, ItemFrame) Then Return False
|
||||
ptSolid.ToGlob(ItemFrame)
|
||||
' Dim ItemFrame As New Frame3d
|
||||
' If Not EgtGetGroupGlobFrame(Item.PartId, ItemFrame) Then Return False
|
||||
' ptSolid.ToGlob(ItemFrame)
|
||||
|
||||
'punto di riferimento per la traslazione sul piano cucina
|
||||
Dim ptKitchen As Point3d = ptERef
|
||||
@@ -1749,6 +1763,16 @@ Friend Module VeinMatching
|
||||
Dim vtMove As Vector3d = ptKitchen - ptSolid
|
||||
EgtMove(Item.PartId, vtMove, GDB_RT.GLOB)
|
||||
|
||||
' eventualmente ruoto per allineare l'alzatina al piano cucina
|
||||
Dim dLRef, dAngVRef, dAngHRef As Double
|
||||
vtRotRef.ToSpherical(dLRef, dAngVRef, dAngHRef)
|
||||
Dim dL, dAngV, dAngH As Double
|
||||
vtRot.Rotate(Vector3d.Z_AX, 180)
|
||||
vtRot.ToSpherical(dL, dAngV, dAngH)
|
||||
Dim dDelta As Double = dAngHRef - dAngH
|
||||
If Math.Abs(dDelta) < EPS_ANG_SMALL Then Return True
|
||||
EgtRotate(Item.PartId, ptKitchen, Vector3d.Z_AX, dDelta, GDB_RT.GLOB)
|
||||
|
||||
Return True
|
||||
End Function
|
||||
End Module
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="InstrumentPanelV"
|
||||
<DockPanel x:Class="InstrumentPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
|
||||
|
||||
<ToggleButton ToolTip="{Binding GetDistToolTip}"
|
||||
Style="{StaticResource ToolBar_ToggleButton}"
|
||||
@@ -11,4 +9,4 @@
|
||||
<Image Source="/Resources/InstrumentPanel/GetDist.png" Stretch="Uniform"/>
|
||||
</ToggleButton>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
</DockPanel>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<DockPanel x:Class="PrintPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
|
||||
|
||||
<Button ToolTip="{Binding PrintToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding PrintCommand}">
|
||||
<Image Source="/Resources/InstrumentPanel/Print.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</DockPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class PrintPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,91 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Public Class PrintPanelVM
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdPrint As ICommand
|
||||
|
||||
Public ReadOnly Property PrintToolTip As String
|
||||
Get
|
||||
' "Print shading" & vbCrLf & "Print hidden line (Shift)"
|
||||
Return "Print"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "PrintCommand"
|
||||
|
||||
Public ReadOnly Property PrintCommand As ICommand
|
||||
Get
|
||||
If m_cmdPrint Is Nothing Then
|
||||
m_cmdPrint = New Command(AddressOf Print)
|
||||
End If
|
||||
Return m_cmdPrint
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Print(ByVal param As Object)
|
||||
Dim SM_Select As SM = SM.SHADING
|
||||
|
||||
' Imposto la stampa HiddenLine (non è gestita la stampa WireFrame)
|
||||
'If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
|
||||
' SM_Select = SM.HIDDENLINE
|
||||
' EgtSetLineAttribs(3)
|
||||
'End If
|
||||
|
||||
' Gestione stampa in funzione del della visualizzazione corrente
|
||||
If OmagOFFICEMap.refShowPanelVM.WireframeIsChecked Then
|
||||
SM_Select = SM.WIREFRAME
|
||||
EgtSetLineAttribs(3)
|
||||
ElseIf OmagOFFICEMap.refShowPanelVM.HiddenLineIsChecked Then
|
||||
SM_Select = SM.HIDDENLINE
|
||||
EgtSetLineAttribs(3)
|
||||
End If
|
||||
|
||||
Dim printDlg As New PrintDialog
|
||||
Dim sPath = OmagOFFICEMap.refMainWindowVM.MainWindowM.sTempDir & "\Image.png"
|
||||
If printDlg.ShowDialog() Then
|
||||
' Recupero le dimensioni dell'area di stampa
|
||||
Dim dW As Double = printDlg.PrintableAreaWidth
|
||||
Dim dH As Double = printDlg.PrintableAreaHeight
|
||||
Try
|
||||
' Prendo l'immagine corrente per la stampa
|
||||
Dim colWhite As New Color3d(255, 255, 255)
|
||||
' Recupero le dimensioni correnti della pagina di disegno
|
||||
Dim nImgW As Integer = GetWidthDimProjectV()
|
||||
Dim nImgH As Integer = GetHeightDimProjectV()
|
||||
If Not EgtGetImage(SM_Select, colWhite, colWhite, nImgW, nImgH, sPath) Then
|
||||
' Error in creating the print image
|
||||
EgtOutLog(EgtMsg(50181))
|
||||
EgtSetLineAttribs(1)
|
||||
Return
|
||||
End If
|
||||
EgtSetLineAttribs(1)
|
||||
'Metodo complesso di stampa che permette di rilasciare il file :
|
||||
'carico la bitmap e la metto in uno stream in memoria
|
||||
Dim stream As System.IO.Stream = New System.IO.MemoryStream()
|
||||
Dim bitmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(sPath)
|
||||
bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Png)
|
||||
bitmap.Dispose()
|
||||
' la sposto in una BitmapImage
|
||||
Dim bitImage As New System.Windows.Media.Imaging.BitmapImage()
|
||||
bitImage.BeginInit()
|
||||
bitImage.StreamSource = stream
|
||||
bitImage.EndInit()
|
||||
' la sposto in un Visual Control
|
||||
Dim tmpImg As New Image
|
||||
tmpImg.BeginInit()
|
||||
tmpImg.Source = bitImage
|
||||
tmpImg.Stretch = Stretch.Uniform
|
||||
tmpImg.EndInit()
|
||||
' eseguo la stampa
|
||||
printDlg.PrintVisual(tmpImg, EgtMsg(91688)) ' Parts Layout
|
||||
Catch
|
||||
' Rrror in executing print
|
||||
EgtOutLog(EgtMsg(50182))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' PrintCommand
|
||||
|
||||
End Class
|
||||
@@ -28,16 +28,19 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Seconda Colonna Terza riga-->
|
||||
<GroupBox Header="{Binding SetUpMsg}" Grid.Column="1" Grid.Row="2">
|
||||
<GroupBox Header="{Binding SetUpMsg}" Grid.Column="1" Grid.Row="2"
|
||||
Style="{StaticResource GroupBoxOptionWnd}">
|
||||
<Grid>
|
||||
<ComboBox ItemsSource="{Binding ArchivedSetUpList}"
|
||||
Style="{StaticResource OptionWnd_ComboBox}"
|
||||
SelectedItem="{Binding SelectedDefaultSetUp}"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!--Seconda colonna Prima Riga-->
|
||||
<GroupBox Header="{Binding HolesMsg}" Grid.Column="1" Grid.Row="0">
|
||||
<GroupBox Header="{Binding HolesMsg}" Grid.Column="1" Grid.Row="0"
|
||||
Style="{StaticResource GroupBoxOptionWnd}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -75,7 +78,8 @@
|
||||
|
||||
<!--Prima Colonna quarta riga - Lista Materiali-->
|
||||
<GroupBox Header="{Binding MaterialsMsg}" Grid.Column="0"
|
||||
Grid.Row="3" Grid.RowSpan="5" Visibility="{Binding Materials_Visibility}">
|
||||
Grid.Row="3" Grid.RowSpan="5" Visibility="{Binding Materials_Visibility}"
|
||||
Style="{StaticResource GroupBoxOptionWnd}">
|
||||
|
||||
<DockPanel>
|
||||
|
||||
@@ -116,17 +120,19 @@
|
||||
</Grid>
|
||||
|
||||
<ListBox ItemsSource="{Binding MaterialList}"
|
||||
SelectedItem="{Binding SelMaterial}"
|
||||
DisplayMemberPath="sName"
|
||||
Grid.RowSpan="2"
|
||||
Margin="0,0,0,5"/>
|
||||
SelectedItem="{Binding SelMaterial}"
|
||||
Style="{StaticResource OptionWnd_ListBox}"
|
||||
DisplayMemberPath="sName"
|
||||
Grid.RowSpan="2"
|
||||
Margin="0,0,0,5"/>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri taglio lama-->
|
||||
<GroupBox Header="{Binding SawParamMsg}" Visibility="{Binding SawParam_Visibility}">
|
||||
<GroupBox Header="{Binding SawParamMsg}" Visibility="{Binding SawParam_Visibility}"
|
||||
Style="{StaticResource GroupBoxOptionWnd}">
|
||||
<UniformGrid Columns="2" >
|
||||
|
||||
<TextBlock Text="{Binding CutExtraLenMsg}"
|
||||
@@ -157,7 +163,8 @@
|
||||
</GroupBox>
|
||||
|
||||
<!--Seconda colonna, seconda riga-->
|
||||
<GroupBox Header="{Binding MachineParamMsg}" Grid.Column="1" Grid.Row="1">
|
||||
<GroupBox Header="{Binding MachineParamMsg}" Grid.Column="1" Grid.Row="1"
|
||||
Style="{StaticResource GroupBoxOptionWnd}">
|
||||
<UniformGrid Columns="2">
|
||||
|
||||
<TextBlock Text="{Binding SafeZMsg}"
|
||||
@@ -168,7 +175,8 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="{Binding MillingParamMsg}" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2">
|
||||
<GroupBox Header="{Binding MillingParamMsg}" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2"
|
||||
Style="{StaticResource GroupBoxOptionWnd}">
|
||||
<UniformGrid Rows="3">
|
||||
|
||||
<Grid Visibility="{Binding MillingParam_Visibility}">
|
||||
@@ -194,7 +202,8 @@
|
||||
</GroupBox>
|
||||
|
||||
<!--Nesting-->
|
||||
<GroupBox Header="{Binding NestingParamMsg}" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2">
|
||||
<GroupBox Header="{Binding NestingParamMsg}" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2"
|
||||
Style="{StaticResource GroupBoxOptionWnd}">
|
||||
<UniformGrid Columns="2" >
|
||||
|
||||
|
||||
|
||||
@@ -576,13 +576,13 @@ Public Class MachOptionWindowVM
|
||||
|
||||
Public ReadOnly Property OkMsg As String
|
||||
Get
|
||||
Return "Ok"
|
||||
Return EgtMsg(91651) ' Ok
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CancelMsg As String
|
||||
Get
|
||||
Return "Cancel"
|
||||
Return EgtMsg(91652) ' Cancel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="MachinePanelV"
|
||||
<DockPanel x:Class="MachinePanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False"
|
||||
Background="{StaticResource Omag_Gray}" BorderBrush="{StaticResource Omag_Gray}"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
IsEnabled="{Binding MachPanel_IsEnabled}">
|
||||
|
||||
<!--Combobox per selezionare la macchina corrente--><!--
|
||||
<ComboBox ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
|
||||
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
|
||||
Height="20" Width="150"/>-->
|
||||
|
||||
<Button Command="{Binding ToolDbCommand}" ToolTip="{Binding ToolDBToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Width="70" Content="{Binding ToolDBMsg}"/>
|
||||
<Button Command="{Binding MachDbCommand}" ToolTip="{Binding MachiningDbToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Width="70" Content="{Binding MachiningDbMsg}"/>
|
||||
<Button Command="{Binding SetUpCommand}" ToolTip="{Binding SetUpToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Width="70" Content="{Binding SetUpMsg}"
|
||||
Background="{Binding SetUp_Background}"/>
|
||||
<Button Command="{Binding WaterjetDbCommand}" ToolTip="{Binding WaterjetDbToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}" Width="70" Content="{Binding WaterjetDbMsg}" Visibility="{Binding WjDb_Visibility}"/>
|
||||
<Button Command="{Binding MachOptionsCommand}" ToolTip="{Binding OptionsToolTip}">
|
||||
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
||||
</Button>
|
||||
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<Button Command="{Binding ToolDbCommand}" ToolTip="{Binding ToolDBToolTip}" Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/NewIcons/DB-lavorazioni.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding MachDbCommand}" ToolTip="{Binding MachiningDbToolTip}" Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/NewIcons/DB-utensili.png" Stretch="UniformToFill"/>
|
||||
</Button>
|
||||
<Button Command="{Binding SetUpCommand}" ToolTip="{Binding SetUpToolTip}" Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/NewIcons/ToolChangerPos.png" Stretch="Uniform" />
|
||||
</Button>
|
||||
<Button Command="{Binding WaterjetDbCommand}" ToolTip="{Binding WaterjetDbToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}" Visibility="{Binding WjDb_Visibility}">
|
||||
<Image Source="/Resources/NewIcons/DB-WJ.png" Stretch="UniformToFill"/>
|
||||
</Button>
|
||||
<Button Command="{Binding MachOptionsCommand}" ToolTip="{Binding OptionsToolTip}" Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Options.png" Stretch="Uniform" />
|
||||
</Button>
|
||||
</DockPanel>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
Public Class MachinePanelV
|
||||
|
||||
Public Class MachinePanelV
|
||||
|
||||
End Class
|
||||
|
||||
@@ -95,16 +95,19 @@ Public Class MyMachinePanelVM
|
||||
OmagOFFICEMap.SetRefMachinePanelVM(Me)
|
||||
' recupero cartella radice delle macchine
|
||||
m_sMachinesRoot = OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot
|
||||
' Carica macchine da cartella delle macchine
|
||||
Machine.MachineListInit(m_sMachinesRoot, MachineList)
|
||||
' Inizializzo valori visibilità parametri Db utensili e lavorazioni
|
||||
OmagOFFICETMDbParamVisibility.Init()
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub Init( sMchRoots As String)
|
||||
' procedo ad inizializzare la classe → carico la lista "MachineList" che visualizzo per l'inserimento di nuovi MachGroup
|
||||
Machine.MachineListInit(sMchRoots, MachineList)
|
||||
' Inizializzo valori visibilità parametri Db utensili e lavorazioni
|
||||
' OmagOFFICETMDbParamVisibility.Init()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
@@ -118,9 +121,72 @@ Public Class MyMachinePanelVM
|
||||
End If
|
||||
|
||||
Dim ToolDbWindowVM As New ToolDbWindowVM(CurrentMachine.sMachDir, CurrentMachine.sMachIniFile, OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx(), "Stone", OmagOFFICEMap.refMainWindowVM.MainWindowM.nUserLevel > 5)
|
||||
Dim ToolDbWindowV As New ToolDbWindowV(Application.Current.MainWindow, ToolDbWindowVM)
|
||||
' 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)
|
||||
ToolDbWindowVM.SetBackgroundColor(BackTopColor, BackBotColor)
|
||||
|
||||
ToolDbWindowVM.bPersonalInterface = True
|
||||
|
||||
' Collegata allo stile della GroupBox
|
||||
ToolDbWindowVM.MyBorderGrbThickness = 0.25
|
||||
ToolDbWindowVM.MyForegroundGrbColor = Brushes.White
|
||||
|
||||
' Definisco lo stile della pagina
|
||||
ToolDbWindowVM.BorderBrushIsMouseOver = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
ToolDbWindowVM.GeneralBorderBrush = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
ToolDbWindowVM.BorderBrushIsFocused = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
ToolDbWindowVM.BackgroundBrdEnable = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
ToolDbWindowVM.BackgroundBrdDisable = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
ToolDbWindowVM.BackgroundTxBlDisable = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
ToolDbWindowVM.ForegroundTxBlEnable = Brushes.White
|
||||
ToolDbWindowVM.ForegroundTxBlDisable = Brushes.White
|
||||
ToolDbWindowVM.GeneralForeground = Brushes.White
|
||||
ToolDbWindowVM.GeneralBackground = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
|
||||
' Definisco lo stile della ComboBox
|
||||
ToolDbWindowVM.BackgroundCmBxTxBl = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
ToolDbWindowVM.BackgroundListCmBxTxBl = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
ToolDbWindowVM.ForegroundCmBxTxBl = Brushes.White
|
||||
ToolDbWindowVM.BorderBrushCmBxTxBl = Brushes.Black
|
||||
ToolDbWindowVM.BorderThicknessCmBxTxBl = New Thickness(1)
|
||||
ToolDbWindowVM.VerticalContentAlignmentCmBxTxBl = "Center"
|
||||
ToolDbWindowVM.HeightCmBxTxBl = "25"
|
||||
ToolDbWindowVM.WidthCmBxTxBl = "Auto"
|
||||
ToolDbWindowVM.ForegroundTextBoxCmBxTxBl = Brushes.White
|
||||
|
||||
'Definisco lo stile del Button
|
||||
ToolDbWindowVM.BackgroundButton = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
ToolDbWindowVM.ForegroundButton = Brushes.White
|
||||
ToolDbWindowVM.BorderBrushButton = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
ToolDbWindowVM.BorderThicknessButton = New Thickness(1)
|
||||
|
||||
''Definisco lo stile della DataGrid
|
||||
'ToolDbWindowVM.HeaderVisibility = DataGridHeadersVisibility.Column
|
||||
'ToolDbWindowVM.BackgroundDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
'ToolDbWindowVM.BackGroundHeader = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
'ToolDbWindowVM.ForegroundHeader = Brushes.White
|
||||
'ToolDbWindowVM.BorderBrushHeader = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
'ToolDbWindowVM.BorderThicknessHeader = 0.0
|
||||
'ToolDbWindowVM.FontWeightHeader = FontWeights.Bold
|
||||
'ToolDbWindowVM.BackgroundDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
'ToolDbWindowVM.BorderBrushDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
'ToolDbWindowVM.BackgroundDataGridRow = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
'ToolDbWindowVM.ForegroundDataGridRow = Brushes.White
|
||||
'ToolDbWindowVM.BorderBrushDataGridRow = Brushes.DarkGray
|
||||
'ToolDbWindowVM.BorderThicknessDataGridRow = "0 0 0 1"
|
||||
'ToolDbWindowVM.BorderBrushDataGridCell = Brushes.DarkGray
|
||||
'ToolDbWindowVM.BorderThicknessDataGridCell = "0 0 1 0"
|
||||
|
||||
' Definisco stile New Mach Grouo
|
||||
|
||||
|
||||
' Dim ToolDbWindowV As New ToolDbWindowV(Application.Current.MainWindow, ToolDbWindowVM)
|
||||
Dim ToolDbWindowV As New MyToolDbWindowV(Application.Current.MainWindow, ToolDbWindowVM)
|
||||
If ToolDbWindowVM.MatType <> 0 Then
|
||||
ToolDbWindowV.Height = 640
|
||||
ToolDbWindowV.Height = 768
|
||||
ToolDbWindowV.Width = 1024
|
||||
ToolDbWindowV.ShowDialog()
|
||||
Else
|
||||
@@ -139,22 +205,94 @@ Public Class MyMachinePanelVM
|
||||
''' </summary>
|
||||
Public Overrides Sub MachDb(ByVal param As Object)
|
||||
If Not VerifyMachinesDir(m_sMachinesRoot) Then Return
|
||||
|
||||
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
|
||||
If Not EgtMdbReload() Then
|
||||
EgtOutLog("Impossible reloading machining Db")
|
||||
MessageBox.Show(EgtMsg(MSG_MACHININGDBERRORS + 8), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
|
||||
EgtOutLog("Call function: Creazione oggetto MachDbWindowVM")
|
||||
TimeSpanInit()
|
||||
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(CurrentMachine.sMachIniFile, OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx(), "Stone", OmagOFFICEMap.refMainWindowVM.MainWindowM.nUserLevel > 5)
|
||||
Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
|
||||
' Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
|
||||
EgtOutLog("Call function: Aggiorna oggetto MachDbWindowVM")
|
||||
TimeSpanInit()
|
||||
MachDbWindowVM.bPersonalInterface = True
|
||||
|
||||
' Collegata allo stile della GroupBox
|
||||
MachDbWindowVM.MyBorderGrbThickness = 0.25
|
||||
MachDbWindowVM.MyForegroundGrbColor = Brushes.White
|
||||
|
||||
' Definisco lo stile della pagina
|
||||
MachDbWindowVM.BorderBrushIsMouseOver = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.GeneralBorderBrush = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.BorderBrushIsFocused = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.BackgroundBrdEnable = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.BackgroundBrdDisable = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.BackgroundTxBlDisable = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.ForegroundTxBlEnable = Brushes.White
|
||||
MachDbWindowVM.ForegroundTxBlDisable = Brushes.White
|
||||
MachDbWindowVM.GeneralForeground = Brushes.White
|
||||
MachDbWindowVM.GeneralBackground = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.MyForegroundChColor = Brushes.White
|
||||
|
||||
' Definisco lo stile della ComboBox
|
||||
MachDbWindowVM.BackgroundCmBxTxBl = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.BackgroundListCmBxTxBl = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.ForegroundCmBxTxBl = Brushes.White
|
||||
MachDbWindowVM.BorderBrushCmBxTxBl = Brushes.Black
|
||||
MachDbWindowVM.BorderThicknessCmBxTxBl = New Thickness(1)
|
||||
MachDbWindowVM.VerticalContentAlignmentCmBxTxBl = "Center"
|
||||
MachDbWindowVM.HeightCmBxTxBl = "25"
|
||||
MachDbWindowVM.WidthCmBxTxBl = "Auto"
|
||||
MachDbWindowVM.ForegroundTextBoxCmBxTxBl = Brushes.White
|
||||
|
||||
'Definisco lo stile del ToggleButton
|
||||
MachDbWindowVM.BackgroundIsChecked = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.ForegroundIsChecked = Brushes.White
|
||||
MachDbWindowVM.BorderBrushIsChecked = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.BorderThicknessIsChecked = New Thickness(1)
|
||||
MachDbWindowVM.OpacityIsChecked = 0.25
|
||||
|
||||
'Definisco lo stile della DataGrid
|
||||
MachDbWindowVM.HeaderVisibility = DataGridHeadersVisibility.Column
|
||||
MachDbWindowVM.BackgroundDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#484D55"), Brush)
|
||||
MachDbWindowVM.BackGroundHeader = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#484D55"), Brush)
|
||||
MachDbWindowVM.ForegroundHeader = Brushes.White
|
||||
MachDbWindowVM.BorderBrushHeader = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.BorderThicknessHeader = New Thickness(0)
|
||||
MachDbWindowVM.FontWeightHeader = FontWeights.Bold
|
||||
MachDbWindowVM.BorderBrushDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.BackgroundDataGridRow = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush)
|
||||
MachDbWindowVM.ForegroundDataGridRow = Brushes.White
|
||||
MachDbWindowVM.BorderBrushDataGridRow = Brushes.DarkGray
|
||||
MachDbWindowVM.BorderThicknessDataGridRow = New Thickness(0, 0, 0, 1)
|
||||
MachDbWindowVM.BorderBrushDataGridCell = Brushes.DarkGray
|
||||
MachDbWindowVM.BorderThicknessDataGridCell = New Thickness(0, 0, 1, 0)
|
||||
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
|
||||
EgtOutLog("Call function: Creazione oggetto MachDbWindowV")
|
||||
TimeSpanInit()
|
||||
Dim MachDbWindowV As New MyMachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
|
||||
|
||||
|
||||
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
|
||||
EgtOutLog("Call function: Visualizzazione oggetto MachDbWindowV")
|
||||
TimeSpanInit()
|
||||
MachDbWindowV.Height = 768
|
||||
MachDbWindowV.Width = 1024
|
||||
MachDbWindowV.ShowDialog()
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
' Verifico che gli utensili delle lavorazioni correnti siano attrezzati (necessario perchè potrei aver cambiato gli utensili delle lavorazioni)
|
||||
' e che le lavorazioni correnti siano compatibili con materiale e spessore
|
||||
' Lama
|
||||
@@ -203,14 +341,14 @@ Public Class MyMachinePanelVM
|
||||
If Not bOkSetUp Then
|
||||
SetUp_Background = Brushes.Red
|
||||
Else
|
||||
SetUp_Background = DirectCast(New BrushConverter().ConvertFrom("#FFDDDDDD"), SolidColorBrush)
|
||||
SetUp_Background = DirectCast(New BrushConverter().ConvertFrom("#1C1D22"), SolidColorBrush)
|
||||
End If
|
||||
If Not bOkMatThick Then
|
||||
OmagOFFICEMap.refOptionPanelVM.RawPart_Background = Brushes.Red
|
||||
OmagOFFICEMap.refRawPartTabVM.CurrMach_Background = Brushes.Red
|
||||
Else
|
||||
OmagOFFICEMap.refOptionPanelVM.RawPart_Background = OmagOFFICEDictionary.TabControl_Header_Background
|
||||
OmagOFFICEMap.refRawPartTabVM.CurrMach_Background = DirectCast(New BrushConverter().ConvertFrom("#FFDDDDDD"), SolidColorBrush)
|
||||
OmagOFFICEMap.refRawPartTabVM.CurrMach_Background = DirectCast(New BrushConverter().ConvertFrom("#1C1D22"), SolidColorBrush)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -249,7 +387,8 @@ Public Class MyMachinePanelVM
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("STU")
|
||||
|
||||
Dim SetUpWindow As New SetUpWindowV(Application.Current.MainWindow, New MySetUpWindowVM(CurrentMachine.sMachDir, CurrentMachine.sMachineName))
|
||||
' Dim SetUpWindow As New SetUpWindowV(Application.Current.MainWindow, New MySetUpWindowVM(CurrentMachine.sMachDir, CurrentMachine.sMachineName))
|
||||
Dim SetUpWindow As New MySetUpWindowV(Application.Current.MainWindow, New MySetUpWindowVM(CurrentMachine.sMachDir, CurrentMachine.sMachineName))
|
||||
SetUpWindow.Height = 614
|
||||
SetUpWindow.Width = 1024
|
||||
SetUpWindow.ShowDialog()
|
||||
@@ -335,7 +474,8 @@ Public Class MyMachinePanelVM
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub WaterjetDb(ByVal param As Object)
|
||||
Dim WaterjetDbWindow As New WaterjetDbWindowV(Application.Current.MainWindow, New WaterjetDbWindowVM(CurrentMachine.sMachDir))
|
||||
' Dim WaterjetDbWindow As New WaterjetDbWindowV(Application.Current.MainWindow, New WaterjetDbWindowVM(CurrentMachine.sMachDir))
|
||||
Dim WaterjetDbWindow As New MyWaterjetDbWindowV(Application.Current.MainWindow, New WaterjetDbWindowVM(CurrentMachine.sMachDir))
|
||||
WaterjetDbWindow.Height = 546
|
||||
WaterjetDbWindow.Width = 846
|
||||
WaterjetDbWindow.ShowDialog()
|
||||
|
||||
@@ -86,13 +86,29 @@ Public Class MainWindowM
|
||||
Return m_sTempDir
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'------------------INIZIO Gestione elenco direttori macchine ------------------
|
||||
|
||||
Private m_sMachinesRootList As New List(Of String)
|
||||
Friend ReadOnly Property sMachinesRootList As List(Of String)
|
||||
Get
|
||||
Return m_sMachinesRootList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'------------------FINE Gestione elenco direttori macchine ------------------
|
||||
|
||||
Private m_sMachinesRoot As String
|
||||
Friend ReadOnly Property sMachinesRoot As String
|
||||
Friend Property sMachinesRoot As String
|
||||
Get
|
||||
Return m_sMachinesRoot
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sMachinesRoot = value
|
||||
End Set
|
||||
End Property
|
||||
Private m_sToolMakersDir As String
|
||||
|
||||
Friend ReadOnly Property sToolMakersDir As String
|
||||
Get
|
||||
Return m_sToolMakersDir
|
||||
@@ -168,10 +184,20 @@ Public Class MainWindowM
|
||||
Directory.CreateDirectory(m_sBackUpDir)
|
||||
' Impostazione path resources dir
|
||||
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
|
||||
' Impostazione direttorio per le macchine
|
||||
Dim nIndexDir As Integer = 1
|
||||
Dim sCurrMachineDir As String = String.Empty
|
||||
While GetMainPrivateProfileString(S_MACH, K_MACHINESDIR & nIndexDir.ToString, "", sCurrMachineDir) <> 0
|
||||
If VerifyMachineIsUnique(sCurrMachineDir) Then
|
||||
m_sMachinesRootList.Add(sCurrMachineDir)
|
||||
End If
|
||||
nIndexDir += 1
|
||||
End While
|
||||
' Impostazione direttorio (versioni precedenti 2.4i2) per le macchine
|
||||
If GetMainPrivateProfileString(S_MACH, K_MACHINESDIR, "", m_sMachinesRoot) = 0 Then
|
||||
m_sMachinesRoot = m_sDataRoot & "\" & MACHINES_DFL_DIR
|
||||
End If
|
||||
' Carico il direttorio nell'elenco dei direttori macchina
|
||||
If Not String.IsNullOrEmpty(m_sMachinesRoot) Then m_sMachinesRootList.Add(m_sMachinesRoot)
|
||||
' Impostazione direttorio per toolmakers
|
||||
If GetMainPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", m_sToolMakersDir) = 0 Then
|
||||
m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKERS_DFL_DIR
|
||||
@@ -192,11 +218,18 @@ Public Class MainWindowM
|
||||
Dim sNestKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
EgtSetNestKey( sNestKey)
|
||||
Dim bNetHwKey As Boolean = ( GetMainPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1)
|
||||
EgtSetNetHwKey(bNetHwKey)
|
||||
Dim sLockId As String = ""
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||
If Not String.IsNullOrEmpty(sLockId) Then
|
||||
EgtSetLockId(sLockId)
|
||||
End If
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2401, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2401, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2710, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2710, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -258,7 +291,7 @@ Public Class MainWindowM
|
||||
' Leggo nome cartella delle foto
|
||||
GetMainPrivateProfileString(S_GENERAL, K_PHOTODIR, sDataRoot & "\Data", m_sPhotoDir)
|
||||
' Creo connessione al Db
|
||||
If m_SlabDB And Not ManageDb.ConnectToDb(m_sPhotoDir & "\" & DB_FILENAME) Then
|
||||
If m_SlabDB AndAlso Not ManageDb.ConnectToDb(m_sPhotoDir & "\" & DB_FILENAME) Then
|
||||
EgtOutLog("Error connecting to DB")
|
||||
MessageBox.Show(EgtMsg(92000 + 1), EgtMsg(MSG_EGTMSGBOX + 15), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
m_SlabDB = False
|
||||
@@ -266,13 +299,28 @@ Public Class MainWindowM
|
||||
' Info su opzioni chiave
|
||||
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString() & " " & bProd.ToString())
|
||||
EgtPHOTOLib.MainData.SetConfigDir(m_sConfigDir)
|
||||
EgtPHOTOLib.MainData.SetDebugLevel(m_nDebug)
|
||||
EgtPHOTOLib.MainData.SetKeyLevel(m_nKeyLevel)
|
||||
EgtPHOTOLib.MainData.SetKeyOptions( CInt( m_nKeyOptions))
|
||||
EgtPHOTOLib.MainData.SetKeyOptions(CInt(m_nKeyOptions))
|
||||
EgtPHOTOLib.MainData.SetPhotoDir(m_sPhotoDir)
|
||||
EgtPHOTOLib.MainData.SetBackUpDir(m_sBackUpDir)
|
||||
EgtPHOTOLib.MainData.SetIsOmagOFFICE(True)
|
||||
EgtPHOTOLib.MainData.SetUser(Environment.MachineName & "\" & Environment.UserName & " (" & nInstance.ToString() & ")")
|
||||
Dim sIdKey As String = String.Empty
|
||||
EgtGetKeyInfo(sIdKey)
|
||||
EgtPHOTOLib.MainData.SetKey(sIdKey)
|
||||
End Sub
|
||||
|
||||
' verifico che il nome da inserire non esista già in elenco
|
||||
Private Function VerifyMachineIsUnique(sMachDir As String) As Boolean
|
||||
For Each sDir As String In m_sMachinesRootList
|
||||
If String.Compare( sDir.Trim().TrimEnd("\"c), sMachDir.Trim().TrimEnd("\"c), True) = 0 Then
|
||||
Return False
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub ManageInstance()
|
||||
Dim bCreated As Boolean
|
||||
Try
|
||||
|
||||
@@ -4,24 +4,29 @@
|
||||
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
DataContext="{StaticResource MainWindowVM}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
Style="{DynamicResource MainWindowStyle}"
|
||||
Title="{Binding Title}" Icon="/Resources/OmagOFFICE.ico"
|
||||
MinHeight="600" MinWidth="800"
|
||||
AboutBoxCommand="{Binding AboutBoxCommand}" WindowStyle="None" ResizeMode="NoResize"
|
||||
CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
||||
CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
Background="{StaticResource Omag_DarkGray}">
|
||||
<EgtWPFLib5:EgtCustomWindow.TitlePanel>
|
||||
<OmagOFFICE:TopCommandBarV DataContext="{StaticResource TopCommandBarVM}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.TitlePanel>
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding EscapeCommand}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
|
||||
<!--Pannello principale -->
|
||||
<DockPanel>
|
||||
<DockPanel>
|
||||
|
||||
<!--StatusBar -->
|
||||
<OmagOFFICE:StatusBarV DataContext="{StaticResource StatusBarVM}"
|
||||
<!--StatusBar -->
|
||||
<OmagOFFICE:StatusBarV DataContext="{StaticResource StatusBarVM}"
|
||||
DockPanel.Dock="Bottom"/>
|
||||
<!--Progetto corrente -->
|
||||
<OmagOFFICE:ProjectV DataContext="{StaticResource ProjectVM}"/>
|
||||
<!--Progetto corrente -->
|
||||
<OmagOFFICE:ProjectV DataContext="{StaticResource ProjectVM}"/>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
|
||||
@@ -45,6 +45,7 @@ Public Class MainWindowVM
|
||||
' definizione comandi
|
||||
Private m_cmdAboutBox As ICommand
|
||||
Private m_cmdCloseApplication As ICommand
|
||||
Private m_cmdEscape As ICommand
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
@@ -136,6 +137,27 @@ Public Class MainWindowVM
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Escape"
|
||||
|
||||
Public ReadOnly Property EscapeCommand() As ICommand
|
||||
Get
|
||||
If m_cmdEscape Is Nothing Then
|
||||
m_cmdEscape = New Command(AddressOf Escape)
|
||||
End If
|
||||
Return m_cmdEscape
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Escape()
|
||||
If Not IsNothing(OmagOFFICEMap.refSplitModeVM) Then
|
||||
OmagOFFICEMap.refSplitModeVM.DeactiveSplitCut()
|
||||
OmagOFFICEMap.refSplitModeVM.DeselectWJBridgesPart()
|
||||
OmagOFFICEMap.refSplitModeVM.ResetAllMark()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "AboutBoxCommand"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
|
||||
@@ -29,8 +29,8 @@ Imports System.Windows
|
||||
#End If
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagOFFICE")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017-2022 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagOFFICE")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017-2025 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
'In order to begin building localizable applications, set
|
||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.1.3")>
|
||||
<Assembly: AssemblyFileVersion("2.4.1.3")>
|
||||
<Assembly: AssemblyVersion("2.7.10.2")>
|
||||
<Assembly: AssemblyFileVersion("2.7.10.2")>
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- Opzioni manifesto di Controllo dell'account utente
|
||||
Per modificare il livello di Controllo dell'account utente di Windows, sostituire il
|
||||
nodo requestedExecutionLevel con uno dei seguenti.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
Se si specifica l'elemento requestedExecutionLevel, la funzionalità Virtualizzazione file system e registro di sistema verrà disabilitata.
|
||||
Rimuovere questo elemento se l'applicazione richiede questa virtualizzazione per
|
||||
compatibilità con le versioni precedenti.
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Elenco delle versioni di Windows in cui è stata testata questa applicazione e
|
||||
per cui è stato previsto l'uso. Rimuovere il commento dagli elementi appropriati per
|
||||
fare in modo che Windows selezioni automaticamente l'ambiente più compatibile. -->
|
||||
|
||||
<!-- Windows Vista -->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||
|
||||
<!-- Windows 7 -->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||
|
||||
<!-- Windows 8 -->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||
|
||||
<!-- Windows 8.1 -->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- Indica che l'applicazione è sensibile ai valori DPI e non verrà scalata automaticamente da Windows in caso di
|
||||
valori DPI maggiori. Le applicazioni Windows Presentation Foundation (WPF) sono automaticamente sensibili ai valori DPI, pertanto non è necessario
|
||||
acconsentire esplicitamente. Con le applicazioni Windows Forms destinate a .NET Framework 4.6 per cui è stato acconsentito esplicitamente a questa impostazione,
|
||||
è anche necessario impostare 'EnableWindowsFormsHighDpiAutoResizing' su 'true' nel relativo file app.config.
|
||||
|
||||
Imposta l'applicazione in modo riconosca i percorsi lunghi. Vedere https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
|
||||
<!--
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
-->
|
||||
|
||||
<!-- Abilita i temi per finestre di dialogo e controlli comuni di Windows (Windows XP e versioni successive) -->
|
||||
<!--
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
</assembly>
|
||||
@@ -0,0 +1,109 @@
|
||||
<UserControl x:Class="MyMachGroupPanelV"
|
||||
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"
|
||||
Visibility="{Binding MachGroupPanel_Visibility}">
|
||||
|
||||
<!--<EgtFloating:EgtFloatingPanel.Resources>
|
||||
<SolidColorBrush x:Key="ListBox.Static.Background" Color="#FFFFFFFF"/>
|
||||
<SolidColorBrush x:Key="ListBox.Static.Border" Color="#FFABADB3"/>
|
||||
<SolidColorBrush x:Key="ListBox.Disabled.Background" Color="#FFFFFFFF"/>
|
||||
<SolidColorBrush x:Key="ListBox.Disabled.Border" Color="#FFD9D9D9"/>
|
||||
<Style x:Key="MachiningGroupListBox" TargetType="{x:Type ListBox}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</EgtFloating:EgtFloatingPanel.Resources>-->
|
||||
|
||||
<Grid Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ListBox ItemsSource="{Binding MachGroupList}" SelectedItem="{Binding SelectedMachGroup}"
|
||||
Background="Transparent" BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel IsItemsHost="True" Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<ContentPresenter/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<RadioButton GroupName="MachiningGroups"
|
||||
Height="30" MaxWidth="150" MinWidth="50" Padding="5,0,5,0"
|
||||
ToolTip="{Binding MachGroupToolTip}"
|
||||
IsChecked="{Binding Path=IsSelected,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}},
|
||||
Mode=TwoWay}"
|
||||
IsEnabled="{Binding IsEnabled, Mode=TwoWay}"
|
||||
VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
|
||||
Style="{StaticResource ToolBar_TextToggleButton}">
|
||||
<RadioButton.Content>
|
||||
<TextBlock Text="{Binding Name}" Foreground="white"/>
|
||||
</RadioButton.Content>
|
||||
|
||||
</RadioButton>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.Template>
|
||||
<ControlTemplate TargetType="{x:Type ListBox}">
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="0" SnapsToDevicePixels="true">
|
||||
<EgtWPFLib5:EgtScrollViewer IsPageSlideCommand="True" Focusable="false" Padding="{TemplateBinding Padding}" IsCustom="True" Orientation="Horizontal" RepeatButtonDimension="20">
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</EgtWPFLib5:EgtScrollViewer>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" TargetName="Bd" Value="DeepPink"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="LightPink"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsGrouping" Value="true"/>
|
||||
<!--<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>-->
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</ListBox.Template>
|
||||
</ListBox>
|
||||
|
||||
<Button Content="+" Height="20" Width="20" VerticalAlignment="Center" Focusable="False"
|
||||
Background="{StaticResource Omag_Black}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
Padding="0,0,0,5"
|
||||
Margin="3,0,5,0" Command="{Binding AddMachGroupCommand}" Grid.Column="1"
|
||||
IsEnabled="{Binding IsEnabledAddRemove}"/>
|
||||
<Button Content="-" Height="20" Width="20" VerticalAlignment="Center" Focusable="False"
|
||||
Background="{StaticResource Omag_Black}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
Padding="0,0,0,5"
|
||||
Margin="0,0,5,0" Command="{Binding RemoveMachGroupCommand}" Grid.Column="2"
|
||||
IsEnabled="{Binding IsEnabledAddRemove}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class MyMachGroupPanelV
|
||||
|
||||
End Class
|
||||
@@ -33,19 +33,22 @@ Public Class MyMachGroupPanelVM
|
||||
|
||||
Sub New()
|
||||
MyBase.New()
|
||||
' Recupero la macchina di default
|
||||
Dim sDefaultMachine As String = String.Empty
|
||||
GetMainPrivateProfileString(S_MACH, K_CURRMACH, "", sDefaultMachine)
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefMachGroupPanelVM(Me)
|
||||
InitMachGroupPanel(True, OmagOFFICEMap.refMachinePanelVM.MachineList.ToList(),
|
||||
sDefaultMachine, BASE_MACH_GROUP & "1")
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub Init()
|
||||
' Recupero la macchina di default
|
||||
Dim sDefaultMachine As String = String.Empty
|
||||
GetMainPrivateProfileString(S_MACH, K_CURRMACH, "", sDefaultMachine)
|
||||
EgtSetCurrMachine(sDefaultMachine)
|
||||
InitMachGroupPanel(True, OmagOFFICEMap.refMachinePanelVM.MachineList.ToList(), sDefaultMachine, BASE_MACH_GROUP & "1")
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AddMachGroup()
|
||||
If NewMachGroup() Then
|
||||
' creo oggetto gruppo creato
|
||||
@@ -71,7 +74,9 @@ Public Class MyMachGroupPanelVM
|
||||
Dim sMachine As String = String.Empty
|
||||
EgtGetMachGroupName(nId, sName)
|
||||
EgtGetMachGroupMachineName(nId, sMachine)
|
||||
MachGroupList.Add(New MyMachGroup(nId, sName, sMachine, EgtGetFirstNameInGroup(nId, "Opers")))
|
||||
Dim NewMyMachGoup As MyMachGroup = New MyMachGroup(nId, sName, sMachine, EgtGetFirstNameInGroup(nId, "Opers"))
|
||||
NewMyMachGoup.IsValid = VerifyMachExists(sMachine)
|
||||
MachGroupList.Add(NewMyMachGoup)
|
||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
||||
Dim sSlabNameDB As String = String.Empty
|
||||
EgtGetInfo(nId, INFO_SLABNAME, sSlabNameDB)
|
||||
@@ -99,6 +104,8 @@ Public Class MyMachGroupPanelVM
|
||||
' Salvo macchina del gruppo come nuovo default
|
||||
Dim sCurrMachName As String = String.Empty
|
||||
EgtGetCurrMachineName(sCurrMachName)
|
||||
CurrentMachine.GetMachineClass(sCurrMachName)
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
WriteMainPrivateProfileString(S_MACH, K_CURRMACH, sCurrMachName)
|
||||
' Ricarico la macchina corrente
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, sCurrMachName,
|
||||
@@ -110,10 +117,11 @@ Public Class MyMachGroupPanelVM
|
||||
' Se macchina con più tavole, chiedo quale usare
|
||||
Dim nTabInd As Integer = 1
|
||||
Dim nTabCnt As Integer = CamAuto.GetTableCount()
|
||||
If nTabCnt > 1 And nTabCnt <= 3 Then
|
||||
Dim dlg As New SelectTableWindowV(Application.Current.MainWindow, New SelectTableWindowVM(nTabCnt))
|
||||
dlg.ShowDialog()
|
||||
nTabInd = dlg.m_SelTable
|
||||
Dim SelectTableWindowVM As New SelectTableWindowVM()
|
||||
If nTabCnt > 1 And nTabCnt <= 4 Then
|
||||
Dim SelectTableWindowV As New SelectTableWindowV(Application.Current.MainWindow, SelectTableWindowVM)
|
||||
SelectTableWindowV.ShowDialog()
|
||||
nTabInd = SelectTableWindowVM.nSelectedTable
|
||||
End If
|
||||
EgtSetTable(GetTableName(nTabInd))
|
||||
' leggo nome attrezzaggio di default
|
||||
@@ -152,6 +160,9 @@ Public Class MyMachGroupPanelVM
|
||||
Public Overrides Function OnPostSetCurrMachGroup() As Boolean
|
||||
' Imposto vista solo tavola
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
CurrentMachine.GetMachineClass(SelectedMachGroup.Machine)
|
||||
If IsNothing(OmagOFFICEMap.refMachinePanelVM.SelectedMachine) Then Return False
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
' Ricarico la macchina corrente
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, SelectedMachGroup.Machine,
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
|
||||
@@ -179,6 +190,10 @@ Public Class MyMachGroupPanelVM
|
||||
End If
|
||||
' Verifico che gli utensili delle lavorazioni correnti siano attrezzati (necessario perchè potrei aver cambiato gli utensili delle lavorazioni)
|
||||
' e che le lavorazioni correnti siano compatibili con materiale e spessore
|
||||
|
||||
' Inizializzo l'elenco delle lavorazioni correnti
|
||||
Dim CurrMachining As New CurrMachWindowVM
|
||||
|
||||
' Lama
|
||||
Dim bOkCurrSawing As Boolean = True
|
||||
Dim bOkCurrWaterjetting As Boolean = True
|
||||
@@ -219,23 +234,24 @@ Public Class MyMachGroupPanelVM
|
||||
Else
|
||||
bOkCurrWaterjetting = False
|
||||
End If
|
||||
|
||||
' Imposto il colore del pulsante SetUp
|
||||
If Not bOkSetUp Then
|
||||
OmagOFFICEMap.refMachinePanelVM.SetUp_Background = Brushes.Red
|
||||
Else
|
||||
OmagOFFICEMap.refMachinePanelVM.SetUp_Background = DirectCast(New BrushConverter().ConvertFrom("#FFDDDDDD"), SolidColorBrush)
|
||||
OmagOFFICEMap.refMachinePanelVM.SetUp_Background = DirectCast(New BrushConverter().ConvertFrom("#1C1D22"), SolidColorBrush)
|
||||
End If
|
||||
' Imposto il colore di sfondo del pulsante SettingMachinig
|
||||
If Not bOkMatThick Or Not bOkCurrSawing Then
|
||||
If Not bOkMatThick Or Not bOkCurrWaterjetting Then
|
||||
OmagOFFICEMap.refOptionPanelVM.RawPart_Background = Brushes.Red
|
||||
OmagOFFICEMap.refRawPartTabVM.CurrMach_Background = Brushes.Red
|
||||
Else
|
||||
OmagOFFICEMap.refOptionPanelVM.RawPart_Background = OmagOFFICEDictionary.TabControl_Header_Background
|
||||
OmagOFFICEMap.refRawPartTabVM.CurrMach_Background = DirectCast(New BrushConverter().ConvertFrom("#FFDDDDDD"), SolidColorBrush)
|
||||
OmagOFFICEMap.refRawPartTabVM.CurrMach_Background = DirectCast(New BrushConverter().ConvertFrom("#1C1D22"), SolidColorBrush)
|
||||
End If
|
||||
Else
|
||||
OmagOFFICEMap.refOptionPanelVM.RawPart_Background = OmagOFFICEDictionary.TabControl_Header_Background
|
||||
OmagOFFICEMap.refRawPartTabVM.CurrMach_Background = DirectCast(New BrushConverter().ConvertFrom("#FFDDDDDD"), SolidColorBrush)
|
||||
OmagOFFICEMap.refRawPartTabVM.CurrMach_Background = DirectCast(New BrushConverter().ConvertFrom("#1C1D22"), SolidColorBrush)
|
||||
End If
|
||||
|
||||
' Se non esiste il grezzo vado subito alla sua definizione
|
||||
@@ -248,6 +264,10 @@ Public Class MyMachGroupPanelVM
|
||||
' aggiungo alla lista delle lastre correnti/orig
|
||||
Dim sSlabNameDB As String = GetSlabName()
|
||||
LoadSlabsList(sSlabNameDB)
|
||||
|
||||
' imposto la visibilità dei comandi per il waterjet
|
||||
OmagOFFICEMap.refNestingTabVM.Set_WJ_Cmd_Visibility()
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -332,11 +352,11 @@ Public Class MyMachGroup
|
||||
If Not EgtGetInfo(Id, INFO_SLABHEIGHT, dSlabHeight) Then dSlabHeight = 0
|
||||
Dim sCurrSawing As String = String.Empty
|
||||
If Not EgtGetInfo(m_nOpersGroupId, INFO_CURRSAWING, sCurrSawing) Then sCurrSawing = "---"
|
||||
Return "Name: " & sSlabName & Environment.NewLine &
|
||||
"Material: " & sMaterial & Environment.NewLine &
|
||||
"Thickness: " & LenToString(dSlabHeight, 3) & Environment.NewLine &
|
||||
"Sawing: " & sCurrSawing & Environment.NewLine &
|
||||
"Machine: " & Machine
|
||||
Return EgtMsg(91683) & sSlabName & Environment.NewLine & ' Name:
|
||||
EgtMsg(91684) & sMaterial & Environment.NewLine & ' Material:
|
||||
EgtMsg(91685) & LenToString(dSlabHeight, 3) & Environment.NewLine & ' Thickness:
|
||||
EgtMsg(91686) & sCurrSawing & Environment.NewLine & ' Sawing:
|
||||
EgtMsg(91687) & Machine ' Machine:
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
@@ -12,164 +12,199 @@
|
||||
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
Height="900">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}"
|
||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<EgtWPFLib5:MachiningParamVisibilityConverter x:Key="MachiningParamVisibilityConverter"/>
|
||||
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
|
||||
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
||||
<sys:Int32 x:Key="Invert">0</sys:Int32>
|
||||
<sys:Int32 x:Key="LeaveTab">1</sys:Int32>
|
||||
<sys:Int32 x:Key="WorkSide">2</sys:Int32>
|
||||
<sys:Int32 x:Key="HeadSide">3</sys:Int32>
|
||||
<sys:Int32 x:Key="LeadInType">4</sys:Int32>
|
||||
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
|
||||
<sys:Int32 x:Key="LeadOutType">6</sys:Int32>
|
||||
<sys:Int32 x:Key="CurveUse">7</sys:Int32>
|
||||
<sys:Int32 x:Key="StepType">8</sys:Int32>
|
||||
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
|
||||
<sys:Int32 x:Key="Speed">10</sys:Int32>
|
||||
<sys:Int32 x:Key="Feed">11</sys:Int32>
|
||||
<sys:Int32 x:Key="StartFeed">12</sys:Int32>
|
||||
<sys:Int32 x:Key="EndFeed">13</sys:Int32>
|
||||
<sys:Int32 x:Key="TipFeed">14</sys:Int32>
|
||||
<sys:Int32 x:Key="OffSr">15</sys:Int32>
|
||||
<sys:Int32 x:Key="OffSl">16</sys:Int32>
|
||||
<sys:Int32 x:Key="SideAngle">17</sys:Int32>
|
||||
<sys:Int32 x:Key="Approx">18</sys:Int32>
|
||||
<sys:Int32 x:Key="StartPos">19</sys:Int32>
|
||||
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
|
||||
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
|
||||
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
|
||||
<sys:Int32 x:Key="StepPar">23</sys:Int32>
|
||||
<sys:Int32 x:Key="ReturnPos">24</sys:Int32>
|
||||
<sys:Int32 x:Key="TabLen">25</sys:Int32>
|
||||
<sys:Int32 x:Key="TabDist">26</sys:Int32>
|
||||
<sys:Int32 x:Key="TabHeight">27</sys:Int32>
|
||||
<sys:Int32 x:Key="TabAngle">28</sys:Int32>
|
||||
<sys:Int32 x:Key="LiTang">29</sys:Int32>
|
||||
<sys:Int32 x:Key="LiPerp">30</sys:Int32>
|
||||
<sys:Int32 x:Key="LiElev">31</sys:Int32>
|
||||
<sys:Int32 x:Key="LiCompLen">32</sys:Int32>
|
||||
<sys:Int32 x:Key="LoTang">33</sys:Int32>
|
||||
<sys:Int32 x:Key="LoPerp">34</sys:Int32>
|
||||
<sys:Int32 x:Key="LoElev">35</sys:Int32>
|
||||
<sys:Int32 x:Key="LoCompLen">36</sys:Int32>
|
||||
<sys:Int32 x:Key="StartAddLen">37</sys:Int32>
|
||||
<sys:Int32 x:Key="EndAddLen">38</sys:Int32>
|
||||
<sys:Int32 x:Key="StepExtArc">39</sys:Int32>
|
||||
<sys:Int32 x:Key="StepIntArc">40</sys:Int32>
|
||||
<sys:Int32 x:Key="SideStep">41</sys:Int32>
|
||||
<sys:Int32 x:Key="VertFeed">42</sys:Int32>
|
||||
<sys:Int32 x:Key="NamePar">43</sys:Int32>
|
||||
<sys:Int32 x:Key="Tool">44</sys:Int32>
|
||||
<sys:Int32 x:Key="DepthStr">45</sys:Int32>
|
||||
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
|
||||
<sys:Int32 x:Key="OverLap">47</sys:Int32>
|
||||
<sys:Int32 x:Key="SubType">49</sys:Int32>
|
||||
<sys:Int32 x:Key="SelectedSolChoiceType">50</sys:Int32>
|
||||
<sys:Int32 x:Key="AxRotRef">51</sys:Int32>
|
||||
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
|
||||
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
|
||||
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
|
||||
<sys:Int32 x:Key="StepBack">55</sys:Int32>
|
||||
<sys:Int32 x:Key="StepSideAngBack">56</sys:Int32>
|
||||
<sys:Int32 x:Key="BackFeed">57</sys:Int32>
|
||||
<sys:Int32 x:Key="StepSideAng">58</sys:Int32>
|
||||
<sys:Int32 x:Key="ForwardAngle">59</sys:Int32>
|
||||
<sys:Int32 x:Key="Probing">60</sys:Int32>
|
||||
<sys:Int32 x:Key="ProbingMinDist">61</sys:Int32>
|
||||
<sys:Int32 x:Key="ProbingMaxDist">62</sys:Int32>
|
||||
<sys:Int32 x:Key="ExtCornType">63</sys:Int32>
|
||||
<sys:Int32 x:Key="IntCornType">64</sys:Int32>
|
||||
<sys:Int32 x:Key="CornSlowLen">65</sys:Int32>
|
||||
<sys:Int32 x:Key="CornSlowPerc">66</sys:Int32>
|
||||
<sys:Int32 x:Key="LiHole">67</sys:Int32>
|
||||
<sys:Int32 x:Key="LiHoleRad">68</sys:Int32>
|
||||
<sys:Int32 x:Key="LpTurns">69</sys:Int32>
|
||||
<sys:Int32 x:Key="HpTurns">70</sys:Int32>
|
||||
<sys:Int32 x:Key="ThicknessFeed">71</sys:Int32>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<!--<EgtWPFLib5:MachiningParamVisibilityConverter x:Key="MachiningParamVisibilityConverter"/>-->
|
||||
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
|
||||
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
||||
<sys:Int32 x:Key="Invert">0</sys:Int32>
|
||||
<sys:Int32 x:Key="LeaveTab">1</sys:Int32>
|
||||
<sys:Int32 x:Key="WorkSide">2</sys:Int32>
|
||||
<sys:Int32 x:Key="HeadSide">3</sys:Int32>
|
||||
<sys:Int32 x:Key="LeadInType">4</sys:Int32>
|
||||
<sys:Int32 x:Key="ExtLinkType">5</sys:Int32>
|
||||
<sys:Int32 x:Key="LeadOutType">6</sys:Int32>
|
||||
<sys:Int32 x:Key="CurveUse">7</sys:Int32>
|
||||
<sys:Int32 x:Key="StepType">8</sys:Int32>
|
||||
<sys:Int32 x:Key="LeadLinkType">9</sys:Int32>
|
||||
<sys:Int32 x:Key="Speed">10</sys:Int32>
|
||||
<sys:Int32 x:Key="Feed">11</sys:Int32>
|
||||
<sys:Int32 x:Key="StartFeed">12</sys:Int32>
|
||||
<sys:Int32 x:Key="EndFeed">13</sys:Int32>
|
||||
<sys:Int32 x:Key="TipFeed">14</sys:Int32>
|
||||
<sys:Int32 x:Key="OffSr">15</sys:Int32>
|
||||
<sys:Int32 x:Key="OffSl">16</sys:Int32>
|
||||
<sys:Int32 x:Key="SideAngle">17</sys:Int32>
|
||||
<sys:Int32 x:Key="Approx">18</sys:Int32>
|
||||
<sys:Int32 x:Key="StartPos">19</sys:Int32>
|
||||
<sys:Int32 x:Key="StartSlowLen">20</sys:Int32>
|
||||
<sys:Int32 x:Key="EndSlowLen">21</sys:Int32>
|
||||
<sys:Int32 x:Key="ThrouAddLen">22</sys:Int32>
|
||||
<sys:Int32 x:Key="StepPar">23</sys:Int32>
|
||||
<sys:Int32 x:Key="ReturnPos">24</sys:Int32>
|
||||
<sys:Int32 x:Key="TabLen">25</sys:Int32>
|
||||
<sys:Int32 x:Key="TabDist">26</sys:Int32>
|
||||
<sys:Int32 x:Key="TabHeight">27</sys:Int32>
|
||||
<sys:Int32 x:Key="TabAngle">28</sys:Int32>
|
||||
<sys:Int32 x:Key="LiTang">29</sys:Int32>
|
||||
<sys:Int32 x:Key="LiPerp">30</sys:Int32>
|
||||
<sys:Int32 x:Key="LiElev">31</sys:Int32>
|
||||
<sys:Int32 x:Key="LiCompLen">32</sys:Int32>
|
||||
<sys:Int32 x:Key="LoTang">33</sys:Int32>
|
||||
<sys:Int32 x:Key="LoPerp">34</sys:Int32>
|
||||
<sys:Int32 x:Key="LoElev">35</sys:Int32>
|
||||
<sys:Int32 x:Key="LoCompLen">36</sys:Int32>
|
||||
<sys:Int32 x:Key="StartAddLen">37</sys:Int32>
|
||||
<sys:Int32 x:Key="EndAddLen">38</sys:Int32>
|
||||
<sys:Int32 x:Key="StepExtArc">39</sys:Int32>
|
||||
<sys:Int32 x:Key="StepIntArc">40</sys:Int32>
|
||||
<sys:Int32 x:Key="SideStep">41</sys:Int32>
|
||||
<sys:Int32 x:Key="VertFeed">42</sys:Int32>
|
||||
<sys:Int32 x:Key="NamePar">43</sys:Int32>
|
||||
<sys:Int32 x:Key="Tool">44</sys:Int32>
|
||||
<sys:Int32 x:Key="DepthStr">45</sys:Int32>
|
||||
<sys:Int32 x:Key="UserNotes">46</sys:Int32>
|
||||
<sys:Int32 x:Key="OverLap">47</sys:Int32>
|
||||
<sys:Int32 x:Key="SubType">49</sys:Int32>
|
||||
<sys:Int32 x:Key="SelectedSolChoiceType">50</sys:Int32>
|
||||
<sys:Int32 x:Key="AxRotRef">51</sys:Int32>
|
||||
<sys:Int32 x:Key="BlockedAxesRef">52</sys:Int32>
|
||||
<sys:Int32 x:Key="FaceUseType">53</sys:Int32>
|
||||
<sys:Int32 x:Key="InvertToolDir">54</sys:Int32>
|
||||
<sys:Int32 x:Key="StepBack">55</sys:Int32>
|
||||
<sys:Int32 x:Key="StepSideAngBack">56</sys:Int32>
|
||||
<sys:Int32 x:Key="BackFeed">57</sys:Int32>
|
||||
<sys:Int32 x:Key="StepSideAng">58</sys:Int32>
|
||||
<sys:Int32 x:Key="ForwardAngle">59</sys:Int32>
|
||||
<sys:Int32 x:Key="Probing">60</sys:Int32>
|
||||
<sys:Int32 x:Key="ProbingMinDist">61</sys:Int32>
|
||||
<sys:Int32 x:Key="ProbingMaxDist">62</sys:Int32>
|
||||
<sys:Int32 x:Key="ExtCornType">63</sys:Int32>
|
||||
<sys:Int32 x:Key="IntCornType">64</sys:Int32>
|
||||
<sys:Int32 x:Key="CornSlowLen">65</sys:Int32>
|
||||
<sys:Int32 x:Key="CornSlowPerc">66</sys:Int32>
|
||||
<sys:Int32 x:Key="LiHole">67</sys:Int32>
|
||||
<sys:Int32 x:Key="LiHoleRad">68</sys:Int32>
|
||||
<sys:Int32 x:Key="LpTurns">69</sys:Int32>
|
||||
<sys:Int32 x:Key="HpTurns">70</sys:Int32>
|
||||
<sys:Int32 x:Key="ThicknessFeed">71</sys:Int32>
|
||||
<SolidColorBrush x:Key="ListBorder" Color="#828790"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.75*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.95*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="11*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="12*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<UniformGrid Grid.Row="0" Columns="3">
|
||||
<Button Content="New" Command="{Binding NewCommand}"
|
||||
<UniformGrid Grid.Row="0" Columns="8">
|
||||
<Button ToolTip="New" Command="{Binding NewCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"/>
|
||||
<Button Content="Save" Command="{Binding SaveCommand}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="Save" Command="{Binding SaveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"/>
|
||||
<Button Content="Remove" Command="{Binding RemoveCommand}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="Remove" Command="{Binding RemoveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"/>
|
||||
</UniformGrid>
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<TreeView Name="MachiningsTreeView" Grid.Row="1"
|
||||
ItemsSource="{Binding Path=MachiningsList}">
|
||||
<Button ToolTip="Import" Command="{Binding ImportCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="Export" Command="{Binding ExportCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Export_1.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="Reset" Command="{Binding ReloadMachiningCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Reset.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" ItemsSource="{Binding Items}">
|
||||
<TreeView Name="MachiningsTreeView" Grid.Row="1"
|
||||
Background="Transparent" BorderThickness="0"
|
||||
ItemsSource="{Binding Path=MachiningsList}">
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource Db_TreeViewItem}">
|
||||
<Setter Property="FontSize" Value="10" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}" />
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" ItemsSource="{Binding Items}">
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="5,0,10,0" VerticalAlignment="Center" HorizontalAlignment="left" />
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
|
||||
|
||||
</HierarchicalDataTemplate>
|
||||
</Grid>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="18" FontSize="15" Margin="10"/>
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="21" FontSize="13" Margin="30,0,10,0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="left"/>
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
|
||||
|
||||
</TreeView>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
|
||||
<ContentControl Content="{Binding ParamPageV}" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
</TreeView>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ContentControl Content="{Binding ParamPageV}" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
'Imports EgtWPFLib5
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyMachiningDbWindowV
|
||||
|
||||
' Private WithEvents m_MachiningDbWindowVM As MyMachiningDbWindowVM
|
||||
Private WithEvents m_MachiningDbWindowVM As EgtWPFLib5.MachiningDbWindowVM
|
||||
|
||||
' Sub New(Owner As Window, MachiningDbWindowVM As MyMachiningDbWindowVM)
|
||||
' MyBase.New(Owner)
|
||||
' ' This call is required by the designer.
|
||||
' InitializeComponent()
|
||||
' Me.DataContext = MachiningDbWindowVM
|
||||
' ' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
' m_MachiningDbWindowVM = MachiningDbWindowVM
|
||||
' End Sub
|
||||
Sub New(Owner As Window, MachiningDbWindowVM As EgtWPFLib5.MachiningDbWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = MachiningDbWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_MachiningDbWindowVM = MachiningDbWindowVM
|
||||
End Sub
|
||||
|
||||
' Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.m_CloseWindow
|
||||
' Me.DataContext = Nothing
|
||||
' Me.DialogResult = bDialogResult
|
||||
' End Sub
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.m_CloseWindow
|
||||
Me.DataContext = Nothing
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -33,19 +33,41 @@ Public Class MySceneHostVM
|
||||
' Recupero e imposto handle finestra principale
|
||||
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
|
||||
EgtSetMainWindowHandle(hMainWnd)
|
||||
' Recupero l'elenco dei direttori radice macchina come stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = GetMachineBaseDirs()
|
||||
' inizializzo gestore lavorazioni
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
If Not EgtInitMachMgr(sMchRoots, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir) Then
|
||||
EgtOutLog("Error on loading machines roots: " & sMchRoots)
|
||||
End If
|
||||
' inizializzo gestione più macchine
|
||||
OmagOFFICEMap.refMachinePanelVM.Init(sMchRoots)
|
||||
OmagOFFICEMap.refMachGroupPanelVM.Init()
|
||||
Return
|
||||
End If
|
||||
' Problemi
|
||||
' Se manca la chiave
|
||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.nKeyLevel = -1 Or OmagOFFICEMap.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)
|
||||
If Not EgtGetNetHwKey() Then
|
||||
EgtOutLog("Missing Dongle")
|
||||
' Box di avviso chiave mancante : "Chiave non presente. \nInserirla e riavviare il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
EgtOutLog("NetDongle is full")
|
||||
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
|
||||
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
' Se altrimenti manca il collegamento con la chiave di rete
|
||||
ElseIf OmagOFFICEMap.refMainWindowVM.MainWindowM.nKeyLevel = -9 Then
|
||||
EgtOutLog("Missing Link with Net Dongle")
|
||||
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
||||
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Altrimenti manca la licenza
|
||||
' 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"
|
||||
@@ -80,12 +102,14 @@ Public Class MySceneHostVM
|
||||
|
||||
Public Overrides Sub InitSceneEvents()
|
||||
AddHandler MainScene.OnMouseDownScene, AddressOf OnMouseDownScene
|
||||
'AddHandler OnMouseDownScene_DoubleClick_1, AddressOf OnMouseDownScene_DoubleClick
|
||||
AddHandler MainScene.OnMouseMoveScene, AddressOf OnMouseMoveScene
|
||||
AddHandler MainScene.OnMouseUpScene, AddressOf OnMouseUpScene
|
||||
AddHandler MainScene.KeyDown, AddressOf OnKeyDownScene
|
||||
AddHandler MainScene.OnCursorPos, AddressOf OnCursorPos
|
||||
AddHandler MainScene.OnShowDistance, AddressOf OnShowDistance
|
||||
AddHandler MainScene.OnChangedSnapPointType, AddressOf OnChangedSnapPointType
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PreInitializeScene()
|
||||
@@ -145,23 +169,40 @@ Public Class MySceneHostVM
|
||||
MainScene.SetSnapPointType(SP.PT_SKETCH)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub SaveProject()
|
||||
MyBase.SaveProject()
|
||||
Public Overrides Function SaveProject() As Boolean
|
||||
Dim bOk As Boolean = MyBase.SaveProject()
|
||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Overrides Sub SaveAsProject()
|
||||
MyBase.SaveAsProject()
|
||||
Public Overrides Function SaveAsProject() As Boolean
|
||||
Dim bOk As Boolean = MyBase.SaveAsProject()
|
||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function GetMachineBaseDirs() As String
|
||||
' Trasformo l'elenco dei direttori radice macchina in una stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = ""
|
||||
' Pulisco eventuali caratteri nascosti: origString.Replace(vbCr, "").Replace(vbLf, "")
|
||||
For Each MachDir In OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRootList
|
||||
MachDir = MachDir.Replace(vbCr, "").Replace(vbLf, "")
|
||||
sMchRoots &= MachDir & "|"
|
||||
Next
|
||||
' rimuovo dalla stringa l'ultimo carattere "|" inserito
|
||||
sMchRoots = sMchRoots.Remove(sMchRoots.Length - 1, 1)
|
||||
If String.IsNullOrEmpty(sMchRoots) Then sMchRoots = OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot
|
||||
EgtOutLog("Machine root list: " & sMchRoots)
|
||||
Return sMchRoots
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "ProjectManager"
|
||||
|
||||
Public Overrides Sub NewProject()
|
||||
Public Overrides Function NewProject() As Boolean
|
||||
EgtSetCurrentContext(MainScene.GetCtx())
|
||||
Dim bOk As Boolean = MainController.NewProject()
|
||||
' Eventuale reset VM
|
||||
@@ -169,9 +210,10 @@ Public Class MySceneHostVM
|
||||
VeinMatching.Clear()
|
||||
End If
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Overrides Sub OpenProject(sFilePath As String)
|
||||
Public Overrides Function OpenProject(sFilePath As String) As Boolean
|
||||
EgtSetCurrentContext(MainScene.GetCtx())
|
||||
Dim bOk As Boolean = False
|
||||
If String.IsNullOrEmpty(sFilePath) Then
|
||||
@@ -194,35 +236,42 @@ Public Class MySceneHostVM
|
||||
Dim sVmFile As String = Path.ChangeExtension(sFile, ".vme")
|
||||
VeinMatching.Open(sVmFile)
|
||||
End If
|
||||
End Sub
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Overrides Sub ExportProject()
|
||||
Public Overrides Function ExportProject() As Boolean
|
||||
Dim bOk As Boolean = False
|
||||
EgtSetCurrentContext(MainScene.GetCtx())
|
||||
' Verifico che il progetto sia salvato
|
||||
If EgtGetModified() Then
|
||||
MessageBox.Show(EgtMsg( 91501), "", MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Return
|
||||
MessageBox.Show(EgtMsg(91501), "", MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Return bOk
|
||||
End If
|
||||
' Scelta del direttorio di destinazione
|
||||
Dim sLastExportDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_GENERAL, K_EXPORTDIR, "", sLastExportDir)
|
||||
Dim DirDlg As New System.Windows.Forms.FolderBrowserDialog
|
||||
DirDlg.Description = EgtMsg( 91502) ' Seleziona il direttorio di esportazione
|
||||
DirDlg.Description = EgtMsg(91502) ' Seleziona il direttorio di esportazione
|
||||
DirDlg.SelectedPath = sLastExportDir
|
||||
If DirDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return
|
||||
If DirDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return bOk
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_EXPORTDIR, DirDlg.SelectedPath)
|
||||
' Eseguo esportazione
|
||||
If ExecExport(DirDlg.SelectedPath) Then
|
||||
bOk = ExecExport(DirDlg.SelectedPath)
|
||||
If bOk Then
|
||||
' Esportazione conclusa con successo
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage( EgtMsg( 91504), 5, MSG_TYPE.INFO)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91504), 5, MSG_TYPE.INFO)
|
||||
bOk = True
|
||||
Else
|
||||
' Errore nell'esportazione
|
||||
MessageBox.Show( EgtMsg( 91503), "", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(EgtMsg(91503), "", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
EgtSetCurrentContext(MainScene.GetCtx())
|
||||
End Sub
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function ExecExport(sDirDest As String) As Boolean
|
||||
' salvo il nome della macchina correntemente selezionata
|
||||
Dim CurrentSelectedMachGroup As String = OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.Machine
|
||||
' Path completa del progetto corrente
|
||||
Dim sFilePath As String = String.Empty
|
||||
EgtGetCurrFilePath(sFilePath)
|
||||
@@ -238,7 +287,9 @@ Public Class MySceneHostVM
|
||||
' Creo un contesto separato con gestore lavorazioni per poter spezzettare il progetto
|
||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||
Dim nCtx As Integer = EgtInitContext()
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Recupero l'elenco dei direttori radice macchina come stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = GetMachineBaseDirs()
|
||||
EgtInitMachMgr(sMchRoots, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Per ogni gruppo di lavoro
|
||||
For Each nMchGrpId As Integer In vMchGrps
|
||||
' Carico il progetto
|
||||
@@ -282,10 +333,10 @@ Public Class MySceneHostVM
|
||||
File.Copy(sOriPath, sNewPath, True)
|
||||
Catch ex As Exception
|
||||
bOk = False
|
||||
EgtOutLog( "Slab image not found :" & sOriPath)
|
||||
EgtOutLog("Slab image not found :" & sOriPath)
|
||||
End Try
|
||||
EgtSetName(nPhotoId, PHOTO_NAME)
|
||||
EgtChangePhotoCenterAsFlatScan( nPhotoId)
|
||||
EgtChangePhotoCenterAsFlatScan(nPhotoId)
|
||||
End If
|
||||
' Elimino gli altri gruppi di lavorazioni
|
||||
For Each nMGrpId As Integer In vMchGrps
|
||||
@@ -308,6 +359,27 @@ Public Class MySceneHostVM
|
||||
Dim nMarkId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetName(nMarkId, NAME_PROJMARK)
|
||||
EgtSetLevel(nMarkId, GDB_LV.SYSTEM)
|
||||
' Imposto la macchina: salvo l'altezza della sovratavola
|
||||
Dim sMachine As String = String.Empty
|
||||
EgtGetInfo(nMchGrpId, "Machine", sMachine)
|
||||
If Not String.IsNullOrEmpty(sMachine) Then
|
||||
CurrentMachine.GetMachineClass(sMachine)
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, sMachine,
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_POLISHING),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_WJ),
|
||||
True)
|
||||
Select Case GetCurrentTable()
|
||||
Case 3
|
||||
EgtSetInfo(nMarkId, K_TAB3_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
|
||||
Case 2
|
||||
EgtSetInfo(nMarkId, K_TAB2_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
|
||||
Case Else
|
||||
EgtSetInfo(nMarkId, K_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
|
||||
End Select
|
||||
End If
|
||||
Dim nReducedCut As Integer = 1
|
||||
EgtGetInfo(nMchGrpId, INFO_REDUCEDCUT, nReducedCut)
|
||||
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
|
||||
@@ -326,37 +398,48 @@ Public Class MySceneHostVM
|
||||
' Salvo il file
|
||||
If Not EgtSaveFile(sFileDest, NGE.CMPTEXT) Then bOk = False
|
||||
Next
|
||||
CurrentMachine.GetMachineClass(CurrentSelectedMachGroup)
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
' reimposto la macchina corrente
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, CurrentSelectedMachGroup,
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_POLISHING),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_WJ),
|
||||
True)
|
||||
' Distruggo il contesto corrente e ripristino quello originale
|
||||
EgtSetCurrentContext(nCurrCtx)
|
||||
EgtDeleteContext(nCtx)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Sub DxfOutProject()
|
||||
Public Function DxfOutProject() As Boolean
|
||||
EgtSetCurrentContext(MainScene.GetCtx())
|
||||
' Verifico che il progetto sia salvato
|
||||
If EgtGetModified() Then
|
||||
MessageBox.Show(EgtMsg( 91501), "", MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Return
|
||||
MessageBox.Show(EgtMsg(91501), "", MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
' Scelta del direttorio di destinazione
|
||||
Dim sLastDxfOutDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_GENERAL, K_DXFOUTDIR, "", sLastDxfOutDir)
|
||||
Dim DirDlg As New System.Windows.Forms.FolderBrowserDialog
|
||||
DirDlg.Description = EgtMsg( 91502) ' Seleziona il direttorio di esportazione
|
||||
DirDlg.Description = EgtMsg(91502) ' Seleziona il direttorio di esportazione
|
||||
DirDlg.SelectedPath = sLastDxfOutDir
|
||||
If DirDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return
|
||||
If DirDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return False
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_DXFOUTDIR, DirDlg.SelectedPath)
|
||||
' Eseguo esportazione
|
||||
If ExecDxfOut(DirDlg.SelectedPath) Then
|
||||
Dim bOk As Boolean = ExecDxfOut(DirDlg.SelectedPath)
|
||||
If bOk Then
|
||||
' Esportazione conclusa con successo
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage( EgtMsg( 91504), 5, MSG_TYPE.INFO)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91504), 5, MSG_TYPE.INFO)
|
||||
Else
|
||||
' Errore nell'esportazione
|
||||
MessageBox.Show( EgtMsg( 91503), "", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(EgtMsg(91503), "", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
EgtSetCurrentContext(MainScene.GetCtx())
|
||||
End Sub
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function ExecDxfOut(sDirDest As String) As Boolean
|
||||
' Path completa del progetto corrente
|
||||
@@ -376,7 +459,9 @@ Public Class MySceneHostVM
|
||||
' Creo un contesto separato con gestore lavorazioni per poter spezzettare il progetto
|
||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||
Dim nCtx As Integer = EgtInitContext()
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Recupero l'elenco dei direttori radice macchina come stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = GetMachineBaseDirs()
|
||||
EgtInitMachMgr(sMchRoots, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Per ogni gruppo di lavoro
|
||||
For Each nMchGrpId As Integer In vMchGrps
|
||||
' Carico il progetto
|
||||
@@ -651,6 +736,8 @@ Public Class MySceneHostVM
|
||||
End Sub
|
||||
|
||||
Private Sub OnSavingProject(ByVal sender As Object, sFile As String)
|
||||
' Salvo le info del progetto
|
||||
TopCommandBarVM.SetInfoProj(sFile)
|
||||
' Recupero tutti i file di texture associabili ai gruppi di lavoro del progetto
|
||||
Dim sDirToSearch As String = Path.GetDirectoryName(sFile)
|
||||
Dim sFileToSearch As String = Path.GetFileNameWithoutExtension(sFile) & "." & PHOTO_NAME & "*"
|
||||
@@ -724,6 +811,13 @@ Public Class MySceneHostVM
|
||||
Private Sub OnMouseDownScene(sender As Object, e As Windows.Forms.MouseEventArgs)
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or Not MainScene.IsStatusNull() Then Return
|
||||
If e.Clicks > 1 Then
|
||||
Select Case OmagOFFICEMap.refOptionPanelVM.SelItem
|
||||
Case OptionPanelVM.Tabs.MACHINING
|
||||
OmagOFFICEMap.refMachiningTabVM.OnMouseDownScene_DoubleClick(sender, e)
|
||||
Case OptionPanelVM.Tabs.SIMUL
|
||||
End Select
|
||||
End If
|
||||
' Chiamo l'opportuno gestore
|
||||
Select Case OmagOFFICEMap.refOptionPanelVM.SelItem
|
||||
Case OptionPanelVM.Tabs.RAWPART
|
||||
@@ -769,6 +863,7 @@ Public Class MySceneHostVM
|
||||
Case OptionPanelVM.Tabs.NESTING
|
||||
OmagOFFICEMap.refNestingTabVM.OnKeyDownScene(sender, e)
|
||||
Case OptionPanelVM.Tabs.MACHINING
|
||||
OmagOFFICEMap.refSplitModeVM.OnKeyDownScene(sender, e)
|
||||
Case OptionPanelVM.Tabs.SIMUL
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="MySetUpWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding CloseSetUpCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
Height="900">
|
||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding ReloadToolCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.95*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="12*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<UniformGrid Grid.Row="0" Columns="8">
|
||||
<Button ToolTip="{Binding ApplyMsg}" Command="{Binding ApplyCommand}"
|
||||
IsEnabled="{Binding IsEnabledApplyBtn}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Export_1.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding ArchiveMsg}" Command="{Binding ArchiveCommand}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Insert.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding RetrievesMsg}" Command="{Binding RetrievesCommand}"
|
||||
CommandParameter="{Binding SelectedItem,ElementName=ToolsTreeView}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Open.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding AutomaticMsg}" Command="{Binding AutomaticCommand}"
|
||||
CommandParameter="{Binding SelectedItem,ElementName=ToolsTreeView}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Automatic.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
|
||||
<TreeView Name="SetUpTreeView" Grid.Row="1"
|
||||
Background="Transparent" BorderThickness="0"
|
||||
ItemsSource="{Binding ToolsList}">
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="FontSize" Value="10" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}" />
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
|
||||
<EventSetter Event="MouseDoubleClick" Handler="Tool_DoubleClick"/>
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolItem}"
|
||||
ItemsSource="{Binding Items}">
|
||||
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="5,0,10,0" VerticalAlignment="Center" HorizontalAlignment="left" />
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}"/>
|
||||
</Grid>
|
||||
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolItem}">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" Height="21" FontSize="13" Margin="30,0,10,0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="left"/>
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Source="{Binding SetUpImage}" MaxWidth="300"/>
|
||||
|
||||
<!--Style="{DynamicResource HorizontalScrollViewerItemsControlStyle}"-->
|
||||
<ItemsControl Grid.Column="1" ItemsSource="{Binding PositionGroupList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
<ItemsControl Grid.Column="1" ItemsSource="{Binding PositionList}" Margin="0,0,20,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="5,5,15,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding TcPos}"
|
||||
Foreground="White"/>
|
||||
<ItemsControl Grid.Column="1" ItemsSource="{Binding ExitToolAssociationList}"
|
||||
HorizontalAlignment="Left">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<!--<WrapPanel Orientation="Horizontal" MaxWidth="200"/>-->
|
||||
<UniformGrid Columns="1"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="10,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--Style="{DynamicResource SetUpToggleButton}"-->
|
||||
<ToggleButton Content="{Binding ExitPar}" Name="ExitBtn"
|
||||
CommandParameter="{Binding SelectedItem,ElementName=SetUpTreeView}"
|
||||
IsChecked="{Binding IsOccupied}" Height="25" Width="25" Margin="0,0,5,0"
|
||||
Command="{Binding SetUpToolCommand}"
|
||||
IsEnabled="{Binding IsEnabledPos}"
|
||||
Background="{Binding ExitBtnBackgroundCol}"
|
||||
Foreground="Black"/>
|
||||
<!--BorderBrush="{DynamicResource EgaltechBlue1}"-->
|
||||
<Border x:Name="ToolBorder" Grid.Column="1"
|
||||
BorderThickness="1" ToolTip="{Binding ToolTipMsg}">
|
||||
<Border.Style>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=ExitBtn, Path=IsChecked}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="{Binding Tool.Name}" Margin="3"
|
||||
Foreground="White"/>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,29 @@
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MySetUpWindowV
|
||||
|
||||
Private WithEvents m_SetUpWindowVM As SetUpWindowVM
|
||||
|
||||
Sub New(Owner As Window, SetUpWindowVM As SetUpWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = SetUpWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_SetUpWindowVM = SetUpWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub Tool_DoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||
Dim TreeViewItem As TreeViewItem = DirectCast(sender, TreeViewItem)
|
||||
If TypeOf TreeViewItem.DataContext Is ToolItem Then
|
||||
Dim SelTool As ToolItem = DirectCast(TreeViewItem.DataContext, ToolItem)
|
||||
m_SetUpWindowVM.ToolDoubleClick(SelTool)
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpWindowVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,21 +1,22 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="MyToolDbWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding CloseToolsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding CloseToolsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
Height="900">
|
||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding ReloadToolCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<EgtWPFLib5:ToolParamVisibilityConverter x:Key="ToolParamVisibilityConverter"/>
|
||||
<!--<EgtWPFLib5:ToolParamVisibilityConverter x:Key="ToolParamVisibilityConverter"/>-->
|
||||
<EgtWPFLib5:ToolDrawUUIDConverter x:Key="ToolDrawUUIDConverter"/>
|
||||
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
||||
<sys:Int32 x:Key="Corr">0</sys:Int32>
|
||||
@@ -46,872 +47,115 @@
|
||||
<sys:Int32 x:Key="TcPos">25</sys:Int32>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.75*"/>
|
||||
<ColumnDefinition Width="0.95*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="11*"/>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="12*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<UniformGrid Grid.Row="0" Columns="3">
|
||||
<Button Content="New" Command="{Binding NewCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"/>
|
||||
<Button Content="Save" Command="{Binding SaveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"/>
|
||||
<Button Content="Remove" Command="{Binding RemoveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"/>
|
||||
<UniformGrid Grid.Row="0" Columns="8">
|
||||
<Button ToolTip="New" Command="{Binding NewCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="Save" Command="{Binding SaveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="Remove" Command="{Binding RemoveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<Button ToolTip="Import" Command="{Binding ImportCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="Export" Command="{Binding ExportCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Export_1.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="Reset" Command="{Binding ReloadToolCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
|
||||
Style = "{DynamicResource MachiningDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Reset.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
<!--Elenco degli utensili-->
|
||||
<!--Elenco degli utensili-->
|
||||
<TreeView Name="ToolsTreeView" Grid.Row="1"
|
||||
Background="Transparent" BorderThickness="0"
|
||||
ItemsSource="{Binding ToolsList}">
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource Db_TreeViewItem}">
|
||||
<Setter Property="FontSize" Value="10" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}" />
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolTreeViewItem}" ItemsSource="{Binding Items}">
|
||||
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolTreeViewItem}" ItemsSource="{Binding Items}">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="5,0,10,0" VerticalAlignment="Center" HorizontalAlignment="left" />
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
</HierarchicalDataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolTreeViewItem}">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolTreeViewItem}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="21" FontSize="13" Margin="30,0,10,0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="left"/>
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="18" FontSize="15" Margin="10"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataTemplate>
|
||||
|
||||
</TreeView.Resources>
|
||||
</TreeView.Resources>
|
||||
|
||||
</TreeView>
|
||||
</TreeView>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.RowSpan="2" Margin="0,2,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding NameParTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource NamePar}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="NameParTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.NamePar,
|
||||
ElementName=ToolsTreeView, Mode=TwoWay,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource NamePar}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.NameErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.NameErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding MaxSpeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxSpeed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="MaxSpeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.MaxSpeed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxSpeed}}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding FeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Feed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="FeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Feed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Feed}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=FeedTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding StartFeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource StartFeed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="StartFeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.StartFeed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource StartFeed}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=StartFeedTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding TotLenTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TotLen}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="TotLenTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.TotLen,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TotLen}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.TotLenErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.TotLenErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding TotDiamTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TotDiam}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="TotDiamTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.TotDiam,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TotDiam}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.TotDiamErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.TotDiamErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding ThickTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Thick}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="ThickTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Thick,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Thick}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.ThickErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.ThickErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding MaxMatTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxMat}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="MaxMatTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.MaxMat,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxMat}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.MaxMatErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.MaxMatErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding LonOffsetTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource LonOffset}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="LonOffsetTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.LonOffset,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource LonOffset}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=LonOffsetTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="9">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding HeadTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Head}}"/>
|
||||
<ComboBox Name="HeadTxBx" Grid.Column="1" Style="{DynamicResource ToolsComboBox}"
|
||||
ItemsSource="{Binding Path=SelectedItem.HeadList, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelectedHead, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
DisplayMemberPath="HText"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Head}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.SelectedHeadErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.SelectedHeadErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding CorrTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Corr}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="CorrTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Corr,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Corr}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=CorrTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="11">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding UserNotesTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource UserNotes}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="UserNotesTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.UserNotes,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource UserNotes}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=UserNotesTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding DrawTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Draw}}"/>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderThickness="0.5,1,0.5,0.5" BorderBrush="{DynamicResource TextBox.Static.Border}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Draw}}">
|
||||
<TextBlock Name="DrawTxBx" Grid.Column="0" Margin="3,0,0,0"
|
||||
VerticalAlignment="Center" Foreground="Gray"
|
||||
ToolTip="{Binding Path=SelectedItem.Draw,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
Converter={StaticResource ToolDrawUUIDConverter}}"
|
||||
Text="{Binding Path=SelectedItem.Draw,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True,
|
||||
Converter={StaticResource ToolDrawUUIDConverter}}"/>
|
||||
</Border>
|
||||
<Button Grid.Column="1" Margin="5,0,0,0" Content="A"
|
||||
Command="{Binding Path=SelectedItem.AutoDrawCommand,ElementName=ToolsTreeView}"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Draw}}"/>
|
||||
<Button Grid.Column="2" Margin="5,0,5,0" Content=". . ."
|
||||
Command="{Binding Path=SelectedItem.OpenDrawFileCommand,ElementName=ToolsTreeView}"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Draw}}"/>
|
||||
</Grid>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.DrawErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.DrawErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding SpeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Speed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="SpeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Speed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Speed}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.SpeedErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.SpeedErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding TipFeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TipFeed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="TipFeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.TipFeed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TipFeed}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=TipFeedTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding EndFeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource EndFeed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="EndFeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.EndFeed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource EndFeed}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=EndFeedTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding LenTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Len}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="LenTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Len,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Len}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.LenErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.LenErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding DiamTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Diam}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="DiamTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.Diam,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Diam}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.DiamErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.DiamErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding CornRadTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource CornRad}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="CornRadTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.CornRad,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource CornRad}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=CornRadTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding SideAngTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource SideAng}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="SideAngTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.SideAng,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource SideAng}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=SideAngTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding RadOffsetTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource RadOffset}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="RadOffsetTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.RadOffset,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource RadOffset}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=RadOffsetTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="9">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding ExitParTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource ExitPar}}"/>
|
||||
<ComboBox Name="ExitParTxBx" Grid.Column="1" Style="{DynamicResource ToolsComboBox}"
|
||||
ItemsSource="{Binding Path=SelectedItem.ExitList,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelectedExit, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource ExitPar}}"/>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource ValidationErrorTextBlock}"
|
||||
Text="{Binding Path=SelectedItem.SelectedExitErrorMsg, ElementName=ToolsTreeView}"
|
||||
Visibility="{Binding Path=SelectedItem.SelectedExitErrorMsg, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ErrorVisibilityConverter}}" Margin="0,0,5,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding TcPosTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TcPos}}"/>
|
||||
<ComboBox Name="TcPosTxBx" Grid.Column="1" Style="{DynamicResource ToolsComboBox}"
|
||||
ItemsSource="{Binding Path=SelectedItem.TcPosList, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelectedTcPos, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource TcPos}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=TcPosTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding MaxAbsorptionTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxAbsorption}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="MaxAbsorptionTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.MaxAbsorption,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MaxAbsorption}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=MaxAbsorptionTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding MinFeedTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MinFeed}}"/>
|
||||
<EgtWPFLib5:EgtTextBox x:Name="MinFeedTxBx" Grid.Column="1" Style="{DynamicResource ToolsTextBox}"
|
||||
Text="{Binding Path=SelectedItem.MinFeed,
|
||||
ElementName=ToolsTreeView, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource MinFeed}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=MinFeedTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Column="0" Grid.Row="13">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding CoolantTxBl}" Style="{DynamicResource ToolsTextBlock}"
|
||||
Visibility="{Binding Path=SelectedItem.Type, ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Coolant}}"/>
|
||||
<ComboBox Name="CoolantTxBx" Grid.Column="1" Style="{DynamicResource ToolsComboBox}"
|
||||
ItemsSource="{Binding Path=SelectedItem.CoolantList, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
SelectedIndex="{Binding Path=SelectedItem.SelCoolant, ElementName=ToolsTreeView,
|
||||
UpdateSourceTrigger=PropertyChanged}"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
Visibility="{Binding Path=SelectedItem.Type,
|
||||
ElementName=ToolsTreeView,
|
||||
Converter={StaticResource ToolParamVisibilityConverter},
|
||||
ConverterParameter={StaticResource Coolant}}"/>
|
||||
<!--<ContentPresenter Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Content="{Binding ElementName=CoolantTxBx,
|
||||
Path=(Validation.Errors).CurrentItem,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
<ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1"/>
|
||||
|
||||
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
||||
<ContentControl Content="{Binding ToolSceneHost}" Grid.Column="2"/>
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
Public Class MyToolDbWindowV
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MyToolDbWindowV
|
||||
|
||||
Private WithEvents m_ToolDbWindowVM As EgtWPFLib5.ToolDbWindowVM
|
||||
|
||||
Sub New(Owner As Window, ToolDbWindowVM As EgtWPFLib5.ToolDbWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = ToolDbWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_ToolDbWindowVM = ToolDbWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub ToolsDbView_Closed(bDialogResult As Boolean) Handles m_ToolDbWindowVM.m_CloseWindow
|
||||
' Imposto contesto generale
|
||||
EgtSetCurrentContext(EgtWPFLib5.ToolDbWindowVM.ProjectSceneContext)
|
||||
' Cancello contesto di visualizzazione utensile
|
||||
EgtDeleteContext(EgtWPFLib5.ToolDbWindowVM.ToolDbSceneContext)
|
||||
'ToolDbWindowVM.m_ToolDbSceneContext = 0
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub ToolsDbView_Closing(sender As Object, e As ComponentModel.CancelEventArgs) Handles Me.Closing
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="MyWaterjetDbWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding CloseToolsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
Height="900" Width="1100">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="11*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="1" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ListBox x:Name="MaterialListBox"
|
||||
Background="Transparent"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
BorderThickness="0"
|
||||
ItemsSource="{Binding MaterialList}"
|
||||
DisplayMemberPath="Name"
|
||||
SelectedItem="{Binding SelMaterial}"
|
||||
Grid.Column="0">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Opacity" Value="1"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="false">
|
||||
<Setter Property="Opacity" Value="0.6"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
|
||||
<ListBox x:Name="SubMaterialListBox"
|
||||
Background="Transparent"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
BorderThickness="0"
|
||||
ItemsSource="{Binding Path=SelectedItem.SubMaterialList, ElementName=MaterialListBox}"
|
||||
DisplayMemberPath="Name"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelSubMaterial, ElementName=MaterialListBox}"
|
||||
Grid.Column="1">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Opacity" Value="1"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="false">
|
||||
<Setter Property="Opacity" Value="0.6"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
|
||||
<DataGrid ItemsSource="{Binding Path=SelectedItem.ParamList, ElementName=SubMaterialListBox}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelWjParam, ElementName=SubMaterialListBox}"
|
||||
Grid.Column="2"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Margin="2.5,0,2.5,0"
|
||||
HeadersVisibility="Column"
|
||||
AutoGenerateColumns="False">
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Black}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_DarkGray}"/>
|
||||
<Setter Property="BorderThickness" Value="0.25"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Opacity" Value="0.7"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Black}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_DarkGray}"/>
|
||||
<Setter Property="BorderThickness" Value="0.25"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type DataGridCell}">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_DarkGray}"/>
|
||||
<Setter Property="BorderThickness" Value="0.25"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource Omag_DarkGray}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_DarkGray}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.Columns>
|
||||
<!--Thickness-->
|
||||
<DataGridTextColumn Binding="{Binding Thickness}"
|
||||
Width="*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Thickness_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Flux-->
|
||||
<DataGridTextColumn Binding="{Binding Flux}"
|
||||
Width="*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Flux_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Q1-->
|
||||
<DataGridTextColumn Binding="{Binding Q1}"
|
||||
Width="*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Q1_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Q2-->
|
||||
<DataGridTextColumn Binding="{Binding Q2}"
|
||||
Width="*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Q2_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Q3-->
|
||||
<DataGridTextColumn Binding="{Binding Q3}"
|
||||
Width="*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Q3_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Q4-->
|
||||
<DataGridTextColumn Binding="{Binding Q4}"
|
||||
Width="*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Q4_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Q5-->
|
||||
<DataGridTextColumn Binding="{Binding Q5}"
|
||||
Width="*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Q5_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--QExtra-->
|
||||
<DataGridTextColumn Binding="{Binding QExtra}"
|
||||
Width="*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.QExtra_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--AngComp-->
|
||||
<DataGridTextColumn Binding="{Binding dAngComp}"
|
||||
Width="*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.AngComp_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="0" Text="{Binding sNewMaterial, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding NewMaterial_Visibility}" Height="20" Margin="10,0">
|
||||
<EgtWPFLib5:EgtTextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
|
||||
<KeyBinding Key="Esc" Command="{Binding CancelCommand}"/>
|
||||
</EgtWPFLib5:EgtTextBox.InputBindings>
|
||||
</EgtWPFLib5:EgtTextBox>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1" Text="{Binding sNewSubMaterial, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding NewSubMaterial_Visibility}" Height="20" Margin="10,0">
|
||||
<EgtWPFLib5:EgtTextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
|
||||
<KeyBinding Key="Esc" Command="{Binding CancelCommand}"/>
|
||||
</EgtWPFLib5:EgtTextBox.InputBindings>
|
||||
</EgtWPFLib5:EgtTextBox>
|
||||
|
||||
<!--<Grid DockPanel.Dock="Bottom" Visibility="{Binding NewMaterial_Visibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sNewMaterial}"
|
||||
DockPanel.Dock="Bottom"
|
||||
Margin="0,0,0,5"/>
|
||||
<Button Content="{Binding OkMsg}" Grid.Column="1"
|
||||
Command="{Binding DoneCommand}"
|
||||
IsEnabled="{Binding EnableOkNewMat}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Margin="2.5,0,0,2.5"/>
|
||||
<Button Content="{Binding CancelMsg}" Grid.Column="2"
|
||||
Command="{Binding CamcelCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Margin="2.5,0,0,2.5"/>
|
||||
</Grid>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<UniformGrid Grid.Column="0" Columns="3" HorizontalAlignment="left">
|
||||
<Button Command="{Binding NewMaterialCommand}" ToolTip="{Binding New_Msg}"
|
||||
Style = "{DynamicResource WaterjetDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<Button Command="{Binding ModifyMaterialCommand}" ToolTip="{Binding Modify_Msg}"
|
||||
Style = "{DynamicResource WaterjetDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Modify.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding DeleteMaterialCommand}" ToolTip="{Binding Delete_Msg}"
|
||||
Style = "{DynamicResource WaterjetDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Grid.Column="1" Columns="3" HorizontalAlignment="left">
|
||||
<Button Command="{Binding NewSubMaterialCommand}" ToolTip="{Binding New_Msg}"
|
||||
Style = "{DynamicResource WaterjetDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding ModifySubMaterialCommand}" ToolTip="{Binding Modify_Msg}"
|
||||
Style = "{DynamicResource WaterjetDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Modify.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding DeleteSubMaterialCommand}" ToolTip="{Binding Delete_Msg}"
|
||||
Style = "{DynamicResource WaterjetDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Grid.Column="2" Columns="3" HorizontalAlignment="Right">
|
||||
<Button Command="{Binding NewWjParamCommand}" ToolTip="{Binding New_Msg}"
|
||||
Style = "{DynamicResource WaterjetDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding DeleteWjParamCommand}" ToolTip="{Binding Delete_Msg}"
|
||||
Style = "{DynamicResource WaterjetDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding SaveCommand}" ToolTip="{Binding Save_Msg}"
|
||||
Style = "{DynamicResource WaterjetDB_Button}">
|
||||
<Image Source="/Resources/TopCommandBar/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,20 @@
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyWaterjetDbWindowV
|
||||
|
||||
Private WithEvents m_WaterjetDbWindowVM As WaterjetDbWindowVM
|
||||
|
||||
Sub New(Owner As Window, WaterjetDbWindowVM As WaterjetDbWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = WaterjetDbWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_WaterjetDbWindowVM = WaterjetDbWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_WaterjetDbWindowVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -12,6 +12,21 @@
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<MyType>Custom</MyType>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -109,20 +124,26 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\OmagOFFICE.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DotNetZip">
|
||||
<HintPath>..\..\EgtProg\OmagOFFICE\DotNetZip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtPHOTOLib, Version=2.3.1.1, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\Dll32\EgtPHOTOLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtUILib">
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
<Reference Include="EgtUILib, Version=2.7.5.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\OmagOFFICE\EgtUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib5">
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip">
|
||||
<HintPath>..\..\EgtProg\OmagOFFICE\Ionic.Zip.dll</HintPath>
|
||||
<Reference Include="EgtWPFLib5, Version=2.7.4.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\OmagOFFICE\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework.Aero" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@@ -213,8 +234,15 @@
|
||||
<Compile Include="EgtStoneLib\VeinMatchingWindow.xaml.vb">
|
||||
<DependentUpon>VeinMatchingWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="InstrumentPanel\PrintPanelV.xaml.vb">
|
||||
<DependentUpon>PrintPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="InstrumentPanel\MyInstrumentPanelVM.vb" />
|
||||
<Compile Include="InstrumentPanel\PrintPanelVM.vb" />
|
||||
<Compile Include="MachinePanel\MyMachinePanelVM.vb" />
|
||||
<Compile Include="MyMachGroupPanel\MyMachGroupPanelV.xaml.vb">
|
||||
<DependentUpon>MyMachGroupPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MyMachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
||||
<DependentUpon>MachinePanelV.xaml</DependentUpon>
|
||||
@@ -230,11 +258,17 @@
|
||||
</Compile>
|
||||
<Compile Include="MachOptionWindow\MachOptionWindowVM.vb" />
|
||||
<Compile Include="MySceneHost\MySceneHostVM.vb" />
|
||||
<Compile Include="MySetUpWindow\MySetUpWindowV.xaml.vb">
|
||||
<DependentUpon>MySetUpWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MySetUpWindow\MySetUpWindowVM.vb" />
|
||||
<Compile Include="MyToolDbWindow\MyToolDbWindowV.xaml.vb">
|
||||
<DependentUpon>MyToolDbWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MyToolDbWindow\MyToolDbWindowVM.vb" />
|
||||
<Compile Include="MyWaterjetDbWindow\MyWaterjetDbWindowV.xaml.vb">
|
||||
<DependentUpon>MyWaterjetDbWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\MachiningTab\MachiningTabV.xaml.vb">
|
||||
<DependentUpon>MachiningTabV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -247,6 +281,10 @@
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\MachiningTab\ModifStartEndCutWindowVM.vb" />
|
||||
<Compile Include="OptionPanel\MachiningTab\ModifStartEndWjWindowVM.vb" />
|
||||
<Compile Include="OptionPanel\MachiningTab\ModifyQualityV.xaml.vb">
|
||||
<DependentUpon>ModifyQualityV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\MachiningTab\ModifyQualityVM.vb" />
|
||||
<Compile Include="OptionPanel\MachiningTab\MoveRawModeV.xaml.vb">
|
||||
<DependentUpon>MoveRawModeV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -255,6 +293,14 @@
|
||||
<DependentUpon>SplitModeV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\MachiningTab\SplitModeVM.vb" />
|
||||
<Compile Include="OptionPanel\NestingTab\ChangeTableV.xaml.vb">
|
||||
<DependentUpon>ChangeTableV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\NestingTab\ChangeTableVM.vb" />
|
||||
<Compile Include="OptionPanel\NestingTab\MultiSelectionV.xaml.vb">
|
||||
<DependentUpon>MultiSelectionV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\NestingTab\MultiSelectionVM.vb" />
|
||||
<Compile Include="OptionPanel\NestingTab\NestingTabV.xaml.vb">
|
||||
<DependentUpon>NestingTabV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -385,6 +431,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="InstrumentPanel\PrintPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MachinePanel\MachinePanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -393,6 +443,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MyMachGroupPanel\MyMachGroupPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MyMachiningDbWindow\MyMachiningDbWindowV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -413,10 +467,18 @@
|
||||
<DependentUpon>MainWindowV.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="MySetUpWindow\MySetUpWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MyToolDbWindow\MyToolDbWindowV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MyWaterjetDbWindow\MyWaterjetDbWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\MachiningTab\MachiningTabV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -429,6 +491,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\MachiningTab\ModifyQualityV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\MachiningTab\MoveRawModeV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -437,6 +503,14 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\NestingTab\ChangeTableV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\NestingTab\MultiSelectionV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\NestingTab\NestingTabV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -558,11 +632,13 @@
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="My Project\app.manifest" />
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="My Project\" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
@@ -683,6 +759,243 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\DxfOut.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\InstrumentPanel\Print.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\1-BottomLeft.png" />
|
||||
<Resource Include="Resources\NewIcons\2-BottomRight.png" />
|
||||
<Resource Include="Resources\NewIcons\3-TopRight.png" />
|
||||
<Resource Include="Resources\NewIcons\4-TopLeft.png" />
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P.png" />
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P1.png" />
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P1_P2.png" />
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P2.png" />
|
||||
<Resource Include="Resources\NewIcons\Allunga-o-accorcia.png" />
|
||||
<Resource Include="Resources\NewIcons\Arco.png" />
|
||||
<Resource Include="Resources\NewIcons\AvantiVeloce.png" />
|
||||
<Resource Include="Resources\NewIcons\BarCode.png" />
|
||||
<Resource Include="Resources\NewIcons\Carica.png" />
|
||||
<Resource Include="Resources\NewIcons\centro.png" />
|
||||
<Resource Include="Resources\NewIcons\Chiudi.png" />
|
||||
<Resource Include="Resources\NewIcons\Copia-dima.png" />
|
||||
<Resource Include="Resources\NewIcons\CSV.png" />
|
||||
<Resource Include="Resources\NewIcons\CsvMinus.png" />
|
||||
<Resource Include="Resources\NewIcons\CsvNew.png" />
|
||||
<Resource Include="Resources\NewIcons\CsvOpen.png" />
|
||||
<Resource Include="Resources\NewIcons\CsvPlus.png" />
|
||||
<Resource Include="Resources\NewIcons\CsvRuinedParts.png" />
|
||||
<Resource Include="Resources\NewIcons\DatiMacchina.png" />
|
||||
<Resource Include="Resources\NewIcons\DB-lavorazioni.png" />
|
||||
<Resource Include="Resources\NewIcons\DB-utensili.png" />
|
||||
<Resource Include="Resources\NewIcons\Deseleziona-tutto.png" />
|
||||
<Resource Include="Resources\NewIcons\Drag_Rettangle.png" />
|
||||
<Resource Include="Resources\NewIcons\Elimina-pezzo.png" />
|
||||
<Resource Include="Resources\NewIcons\Esegui.png" />
|
||||
<Resource Include="Resources\NewIcons\File-CSV.png" />
|
||||
<Resource Include="Resources\NewIcons\Fine-allunga-o-accorcia.png" />
|
||||
<Resource Include="Resources\NewIcons\Fine-centro-fuori.png" />
|
||||
<Resource Include="Resources\NewIcons\Fine-tutti-centro.png" />
|
||||
<Resource Include="Resources\NewIcons\Fine-tutti-fuori.png" />
|
||||
<Resource Include="Resources\NewIcons\Foro-singolo.png" />
|
||||
<Resource Include="Resources\NewIcons\FrameMachining.png" />
|
||||
<Resource Include="Resources\NewIcons\freccia-dx.png" />
|
||||
<Resource Include="Resources\NewIcons\freccia-giu.png" />
|
||||
<Resource Include="Resources\NewIcons\freccia-nera.png" />
|
||||
<Resource Include="Resources\NewIcons\freccia-small.png" />
|
||||
<Resource Include="Resources\NewIcons\freccia-su.png" />
|
||||
<Resource Include="Resources\NewIcons\freccia-sx.png" />
|
||||
<Resource Include="Resources\NewIcons\freccia.png" />
|
||||
<Resource Include="Resources\NewIcons\GenerateCN.png" />
|
||||
<Resource Include="Resources\NewIcons\GenericView-hover.png" />
|
||||
<Resource Include="Resources\NewIcons\GenericView.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-3D.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-cursore.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-cut.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-deseleziona.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-elimina.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-hover-3D.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-hover-cursore.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-hover-magnete.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-hover-mano.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-hover-puntatore.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-hover-righello.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-hover-zoom+.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-hover-zoom-.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-impostazioni.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-inserisci-prezzo.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-magnete.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-mano.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-parcheggia.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-puntatore.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-righello.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-salva.png" />
|
||||
<Resource Include="Resources\NewIcons\ico-seleziona-tutto.png" />
|
||||
<Resource Include="Resources\NewIcons\icone-tagli-1.png" />
|
||||
<Resource Include="Resources\NewIcons\icone-tagli-2.png" />
|
||||
<Resource Include="Resources\NewIcons\icone-tagli-4.png" />
|
||||
<Resource Include="Resources\NewIcons\icone-tagli-5.png" />
|
||||
<Resource Include="Resources\NewIcons\icone-tagli-6.png" />
|
||||
<Resource Include="Resources\NewIcons\IndietroVeloce.png" />
|
||||
<Resource Include="Resources\NewIcons\Inizio-allunga-o-accorcia.png" />
|
||||
<Resource Include="Resources\NewIcons\Inizio-centro-fuori.png" />
|
||||
<Resource Include="Resources\NewIcons\Inizio-tutti-centro.png" />
|
||||
<Resource Include="Resources\NewIcons\Inizio-tutti-fuori.png" />
|
||||
<Resource Include="Resources\NewIcons\Inserisci-pezzo.png" />
|
||||
<Resource Include="Resources\NewIcons\Inverti.png" />
|
||||
<Resource Include="Resources\NewIcons\Linea.png" />
|
||||
<Resource Include="Resources\NewIcons\logo-OmCut.png" />
|
||||
<Resource Include="Resources\NewIcons\Lucidatura.png" />
|
||||
<Resource Include="Resources\NewIcons\Macchina.png" />
|
||||
<Resource Include="Resources\NewIcons\Manual.png" />
|
||||
<Resource Include="Resources\NewIcons\MHT.png" />
|
||||
<Resource Include="Resources\NewIcons\Modifica-fine.png" />
|
||||
<Resource Include="Resources\NewIcons\Modifica-inizio.png" />
|
||||
<Resource Include="Resources\NewIcons\Movimento-manuale.png" />
|
||||
<Resource Include="Resources\NewIcons\Nest.png" />
|
||||
<Resource Include="Resources\NewIcons\NumericKeyboardArrow.png" />
|
||||
<Resource Include="Resources\NewIcons\Nuovo.png" />
|
||||
<Resource Include="Resources\NewIcons\ON_OFF-singolo-taglio.png" />
|
||||
<Resource Include="Resources\NewIcons\Options.png" />
|
||||
<Resource Include="Resources\NewIcons\Parcheggia-pezzo.png" />
|
||||
<Resource Include="Resources\NewIcons\Parking.png" />
|
||||
<Resource Include="Resources\NewIcons\Pausa-ON_OFF.png" />
|
||||
<Resource Include="Resources\NewIcons\Ponticelli.png" />
|
||||
<Resource Include="Resources\NewIcons\Ponticelli_delete.png" />
|
||||
<Resource Include="Resources\NewIcons\Quality.png" />
|
||||
<Resource Include="Resources\NewIcons\RawProbe.png" />
|
||||
<Resource Include="Resources\NewIcons\Rimuovi-segmento.png" />
|
||||
<Resource Include="Resources\NewIcons\Rimuovi_elimina.png" />
|
||||
<Resource Include="Resources\NewIcons\Salva-con-nome.png" />
|
||||
<Resource Include="Resources\NewIcons\Salva-taglio.png" />
|
||||
<Resource Include="Resources\NewIcons\Salva.png" />
|
||||
<Resource Include="Resources\NewIcons\SawProbe.png" />
|
||||
<Resource Include="Resources\NewIcons\Seleziona-tutto.png" />
|
||||
<Resource Include="Resources\NewIcons\Send.png" />
|
||||
<Resource Include="Resources\NewIcons\Sezione-cornice.png" />
|
||||
<Resource Include="Resources\NewIcons\Simula.png" />
|
||||
<Resource Include="Resources\NewIcons\SlabId.png" />
|
||||
<Resource Include="Resources\NewIcons\Specchia.png" />
|
||||
<Resource Include="Resources\NewIcons\Spianatura.png" />
|
||||
<Resource Include="Resources\NewIcons\SPLIT-WJ.png" />
|
||||
<Resource Include="Resources\NewIcons\Split.png" />
|
||||
<Resource Include="Resources\NewIcons\START-WJ.png" />
|
||||
<Resource Include="Resources\NewIcons\Taglio-griglia.png" />
|
||||
<Resource Include="Resources\NewIcons\Taglio-multiplo.png" />
|
||||
<Resource Include="Resources\NewIcons\Taglio-singolo.png" />
|
||||
<Resource Include="Resources\NewIcons\Take-point.png" />
|
||||
<Resource Include="Resources\NewIcons\Test-lama.png" />
|
||||
<Resource Include="Resources\NewIcons\ToolChangerPos.png" />
|
||||
<Resource Include="Resources\NewIcons\Tutti-accorcia.png" />
|
||||
<Resource Include="Resources\NewIcons\Tutti-allunga.png" />
|
||||
<Resource Include="Resources\NewIcons\Tutti-OFF.png" />
|
||||
<Resource Include="Resources\NewIcons\Tutti-ON.png" />
|
||||
<Resource Include="Resources\NewIcons\V.png" />
|
||||
<Resource Include="Resources\NewIcons\Vacuum.png" />
|
||||
<Resource Include="Resources\NewIcons\Vein-match.png" />
|
||||
<Resource Include="Resources\NewIcons\X.png" />
|
||||
<Resource Include="Resources\NewIcons\XYJog.png" />
|
||||
<Resource Include="Resources\NewIcons\ZBJog.png" />
|
||||
<Resource Include="Resources\NewIcons\ZCJog.png" />
|
||||
<Resource Include="Resources\NewIcons\zoom+.png" />
|
||||
<Resource Include="Resources\NewIcons\zoom-.png" />
|
||||
<Resource Include="Resources\NewIcons\ZoomAll-hover.png" />
|
||||
<Resource Include="Resources\NewIcons\ZoomAll.png" />
|
||||
<Resource Include="Resources\NewIcons\ZoomWin.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\RawPartTab\MovePhoto.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\Export_1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\Import.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\Reset.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\Remove.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\Insert.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\Automatic.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\Modify.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Crea-taglio.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Attrezzaggio.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Rimuovi-taglio.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Modifica-taglio.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Crea-taglio-parallelo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\CsvWindow\CsvMinus - Color.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\CsvWindow\CsvPlus - Color.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\CsvWindow\Inserisci-pezzo CSV.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\CsvWindow\Parcheggia-pezzo CSV.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Linea-Elimina.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Linea-Muovi.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Linea-Copia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\DB-WJ.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DetailPage\Cancel.png" />
|
||||
<Resource Include="Resources\DetailPage\Confirm.png" />
|
||||
<Resource Include="Resources\DetailPage\Elimina.png" />
|
||||
<Resource Include="Resources\DetailPage\Pencil.png" />
|
||||
<Resource Include="Resources\DetailPage\Photo.png" />
|
||||
<Resource Include="Resources\DetailPage\Polygon.png" />
|
||||
<Resource Include="Resources\DetailPage\Print.png" />
|
||||
<Resource Include="Resources\DetailPage\Reset.png" />
|
||||
<Resource Include="Resources\DetailPage\Rubber.png" />
|
||||
<Resource Include="Resources\DetailPage\Save.png" />
|
||||
<Resource Include="Resources\DetailPage\ZoomAll.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\LightArrowOff.png" />
|
||||
<Resource Include="Resources\NewIcons\LightArrowOn.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\table.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\tableS.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe
|
||||
|
||||
@@ -4,29 +4,34 @@
|
||||
Margin="5,5,5,0">
|
||||
|
||||
<UniformGrid Columns="4" Margin="0,0,0,5">
|
||||
<Button Style="{StaticResource OptionPanel_Button}"
|
||||
<Button Style="{StaticResource MachiningTab_Button}"
|
||||
Command="{Binding PrevCommand}"
|
||||
IsEnabled="{Binding PrevIsEnabled}"
|
||||
Margin="0,0,2.5,0">
|
||||
<Image Source="/Resources/MachiningTab/BackArrow.png"/>
|
||||
Background="{StaticResource Omag_Black}"
|
||||
Margin="0,0,1,0">
|
||||
<Image Source="/Resources/MachiningTab/BackArrow.png"/>
|
||||
</Button>
|
||||
<Button Style="{StaticResource OptionPanel_Button}"
|
||||
<Button Style="{StaticResource MachiningTab_Button}"
|
||||
Command="{Binding NextCommand}"
|
||||
IsEnabled="{Binding NextIsEnabled}"
|
||||
Margin="0,0,2.5,0">
|
||||
<Image Source="/Resources/MachiningTab/ForwardArrow.png"/>
|
||||
</Button>
|
||||
<Button Style="{StaticResource OptionPanel_Button}"
|
||||
Background="{StaticResource Omag_Black}"
|
||||
Margin="0,0,0,0">
|
||||
<Image Source="/Resources/MachiningTab/ForwardArrow.png"/>
|
||||
</Button>
|
||||
<Button Style="{StaticResource MachiningTab_Button}"
|
||||
Content="{Binding ModifyMsg}"
|
||||
Command="{Binding ModifyCommand}"
|
||||
IsEnabled="{Binding ModifyIsEnabled}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Style="{StaticResource OptionPanel_Button}"
|
||||
Background="{StaticResource Omag_Black}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
Margin="1,0,1,0"/>
|
||||
<Button Style="{StaticResource MachiningTab_Button}"
|
||||
Content="{Binding AutoMsg}"
|
||||
Command="{Binding AutoCommand}"
|
||||
IsEnabled="{Binding AutoIsEnabled}"
|
||||
Visibility="{Binding AutoVisibility}"
|
||||
Margin="0,0,0,0"/>
|
||||
Background="{StaticResource Omag_Black}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
Margin="1,0,1,0"/>
|
||||
</UniformGrid>
|
||||
|
||||
<ContentControl Content="{Binding MachiningModeControl}"/>
|
||||
|
||||
@@ -224,13 +224,17 @@ Public Class MachiningTabVM
|
||||
End Property
|
||||
|
||||
Public Sub Prev(ByVal param As Object)
|
||||
Dim bOk As Boolean = True
|
||||
' Dichiaro solo visualizzazione
|
||||
m_bIsShow = True
|
||||
If m_MachiningMode = MachiningModeOpt.SPLIT Then
|
||||
OmagOFFICEMap.refSplitModeVM.ExitSplitRaw(False)
|
||||
Else
|
||||
OmagOFFICEMap.refMoveRawModeVM.ExitMoveRaw()
|
||||
' verifico collisione dei pezzi in fase di scarico
|
||||
bOk = OmagOFFICEMap.refMoveRawModeVM.ExitMoveRaw()
|
||||
End If
|
||||
' se trovata interferenza tra grezzi (dopo movimentazione) esco
|
||||
If Not bOk Then Return
|
||||
' Torno alla fase precedente
|
||||
EgtSetCurrPhase(EgtGetCurrPhase() - 1)
|
||||
' Si va sempre in Split
|
||||
@@ -255,19 +259,22 @@ Public Class MachiningTabVM
|
||||
End Property
|
||||
|
||||
Public Sub NextCmd(ByVal param As Object)
|
||||
Dim bOk As Boolean = True
|
||||
If m_MachiningMode = MachiningModeOpt.SPLIT Then
|
||||
OmagOFFICEMap.refSplitModeVM.ExitSplitRaw(False)
|
||||
MachiningMode = MachiningModeOpt.MOVERAWPART
|
||||
AutoVisibility = Visibility.Hidden
|
||||
OmagOFFICEMap.refMoveRawModeVM.InitMoveRaw()
|
||||
bOk = OmagOFFICEMap.refMoveRawModeVM.InitMoveRaw()
|
||||
Else
|
||||
OmagOFFICEMap.refMoveRawModeVM.ExitMoveRaw()
|
||||
' se verificata una interferenza allora esco
|
||||
bOk = OmagOFFICEMap.refMoveRawModeVM.ExitMoveRaw()
|
||||
If Not bOk Then Return
|
||||
MachiningMode = MachiningModeOpt.SPLIT
|
||||
AutoVisibility = Visibility.Visible
|
||||
OmagOFFICEMap.refSplitModeVM.InitSplitRaw()
|
||||
End If
|
||||
' Aggiorno possibilità di uscire
|
||||
ManageExit()
|
||||
' Se non ci sono interferenze tra i grezzi -> aggiorno possibilità di uscire
|
||||
If bOk Then ManageExit()
|
||||
End Sub
|
||||
|
||||
#End Region ' NextCommand
|
||||
@@ -327,6 +334,12 @@ Public Class MachiningTabVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub OnMouseDownScene_DoubleClick(sender As Object, e As Windows.Forms.MouseEventArgs)
|
||||
If m_MachiningMode = MachiningModeOpt.SPLIT Then
|
||||
OmagOFFICEMap.refSplitModeVM.OnMouseDownScene_DoubleClick(sender, e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -4,49 +4,31 @@
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
IsMinimizable="False"
|
||||
ShowInTaskbar="False"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
Height="200" Width="400"
|
||||
SizeToContent="Height" Width="270"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Margin="5,5,5,0">
|
||||
|
||||
<TextBlock Grid.Column="1" Grid.Row="1" Margin="0,5,0,0"
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<TextBlock Grid.Column="1" Grid.Row="1" Margin="0,0,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding ValueMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="2" Grid.Row="1" Margin="10,5,10,0"
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="2" Grid.Row="1" Margin="0,0,0,0"
|
||||
Style="{StaticResource OptionTextBox}" Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<Button Name="OkBtn" Content="{Binding OkMsg}" Grid.Column="1"
|
||||
Style="{DynamicResource ToolBar_TextButton}">
|
||||
Style="{DynamicResource CompoWindow_Button}">
|
||||
</Button>
|
||||
<Button Content="{Binding ExitMsg}" Grid.Column="3"
|
||||
IsCancel="True"
|
||||
Style="{DynamicResource ToolBar_TextButton}">
|
||||
Style="{DynamicResource CompoWindow_Button}">
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
|
||||
@@ -3,6 +3,15 @@ Imports EgtUILib
|
||||
|
||||
Public Class ModifStartEndCutWindowVM
|
||||
|
||||
Private m_Title As String = String.Empty
|
||||
Public Property Title As String
|
||||
Get
|
||||
Return m_Title
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Title = value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property ValueMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_SPLITPAGEUC + 35)
|
||||
|
||||
@@ -4,95 +4,81 @@
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
IsMinimizable="False"
|
||||
ShowInTaskbar="False"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
Height="400" Width="400"
|
||||
SizeToContent="Height" Width="270"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Margin="5,5,5,0">
|
||||
|
||||
<TextBlock Name="HoleTxbl" Grid.Column="1" Grid.Row="1" Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding HoleMsg}" Visibility="{Binding HoleVisibility}"/>
|
||||
<CheckBox Name="HoleChBx" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" Margin="10,5,10,0"
|
||||
Style="{DynamicResource OptionCheckBox}" IsChecked="{Binding bHole, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding HoleVisibility}"/>
|
||||
|
||||
<TextBlock Grid.Column="1" Grid.Row="2" Margin="0,5,0,0"
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<TextBlock Name="HoleTxbl" Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding HoleMsg}" Visibility="{Binding HoleVisibility}"/>
|
||||
<CheckBox Name="HoleChBx" HorizontalAlignment="Center" Margin="10,5,10,0"
|
||||
Style="{DynamicResource OptionCheckBox}" IsChecked="{Binding bHole, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding HoleVisibility}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<TextBlock Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding ValueMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="2" Grid.Row="2" Margin="10,5,10,0"
|
||||
<EgtWPFLib5:EgtTextBox Margin="0,0,0,5"
|
||||
Style="{StaticResource OptionTextBox}" Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TextBlock Name="LeadInTxbl" Grid.Column="1" Grid.Row="3" Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding LeadInMsg}" Visibility="{Binding LeadInVisibility}"/>
|
||||
<ComboBox Name="LeadInCmBx" Grid.Column="2" Grid.Row="3" Margin="10,5,10,0"
|
||||
ItemsSource="{Binding LeadInTypeList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelectedLeadInType,Mode=TwoWay}"
|
||||
Style="{DynamicResource MachiningsComboBox}" Visibility="{Binding LeadInVisibility}"/>
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<TextBlock Name="LeadInTxbl" Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding LeadInMsg}" Visibility="{Binding LeadInVisibility}"/>
|
||||
<ComboBox Name="LeadInCmBx" Margin="0,0,0,5"
|
||||
ItemsSource="{Binding LeadInTypeList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelectedLeadInType,Mode=TwoWay}"
|
||||
Style="{DynamicResource MachiningsComboBox}" Visibility="{Binding LeadInVisibility}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<TextBlock Name="LeadOutTxbl"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding LeadOutMsg}" Visibility="{Binding LeadOutVisibility}"/>
|
||||
<ComboBox Name="LeadOutCmBx" Margin="0,0,0,5"
|
||||
ItemsSource="{Binding LeadOutTypeList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelectedLeadOutType,Mode=TwoWay}"
|
||||
Style="{DynamicResource MachiningsComboBox}" Visibility="{Binding LeadOutVisibility}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TextBlock Name="LeadOutTxbl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding LeadOutMsg}" Visibility="{Binding LeadOutVisibility}"/>
|
||||
<ComboBox Name="LeadOutCmBx" Grid.Column="2" Grid.Row="3" Margin="10,5,10,0"
|
||||
ItemsSource="{Binding LeadOutTypeList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelectedLeadOutType,Mode=TwoWay}"
|
||||
Style="{DynamicResource MachiningsComboBox}" Visibility="{Binding LeadOutVisibility}"/>
|
||||
|
||||
<TextBlock Name="TangDistTxbl" Grid.Column="1" Grid.Row="4" Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding TangDistMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Name="LiTangDistTxBx" Grid.Column="2" Grid.Row="4" Margin="10,5,10,0"
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<TextBlock Name="TangDistTxbl" Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding TangDistMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Name="LiTangDistTxBx" Margin="0,0,0,5"
|
||||
Style="{StaticResource OptionTextBox}" Text="{Binding sLiTangDist, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding LeadInVisibility}"/>
|
||||
|
||||
<TextBlock Name="PerpDistTxbl" Grid.Column="1" Grid.Row="5" Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding PerpDistMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Name="LiPerpDistTxBx" Grid.Column="2" Grid.Row="5" Margin="10,5,10,0"
|
||||
Style="{StaticResource OptionTextBox}" Text="{Binding sLiPerpDist, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding LeadInVisibility}"/>
|
||||
|
||||
<EgtWPFLib5:EgtTextBox Name="LoTangDistTxBx" Grid.Column="2" Grid.Row="4" Margin="10,5,10,0"
|
||||
<EgtWPFLib5:EgtTextBox Name="LoTangDistTxBx" Margin="0,0,0,5"
|
||||
Style="{StaticResource OptionTextBox}" Text="{Binding sLoTangDist, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding LeadOutVisibility}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<EgtWPFLib5:EgtTextBox Name="LoPerpDistTxBx" Grid.Column="2" Grid.Row="5" Margin="10,5,10,0"
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<TextBlock Name="PerpDistTxbl" Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding PerpDistMsg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Name="LiPerpDistTxBx" Margin="0,0,0,5"
|
||||
Style="{StaticResource OptionTextBox}" Text="{Binding sLiPerpDist, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding LeadInVisibility}"/>
|
||||
<EgtWPFLib5:EgtTextBox Name="LoPerpDistTxBx" Margin="0,0,0,5"
|
||||
Style="{StaticResource OptionTextBox}" Text="{Binding sLoPerpDist, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding LeadOutVisibility}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="7" Grid.RowSpan="1" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<UniformGrid Name="ButtonsGrid" Columns="2" Margin="0,0,0,5">
|
||||
|
||||
<Button Name="OkBtn" Content="{Binding OkMsg}" Grid.Column="1"
|
||||
Style="{DynamicResource ToolBar_TextButton}">
|
||||
Style="{DynamicResource CompoWindow_Button}">
|
||||
</Button>
|
||||
<Button Content="{Binding ExitMsg}" Grid.Column="3"
|
||||
IsCancel="True"
|
||||
Style="{DynamicResource ToolBar_TextButton}">
|
||||
Style="{DynamicResource CompoWindow_Button}">
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--<GroupBox Header="{Binding DirectInsertHdr}"
|
||||
<!--<GroupBox Header="{Binding DirectInsertHdr}"
|
||||
Grid.Row="2" Margin="0,0,5,5">
|
||||
<UniformGrid Rows="2">
|
||||
<Grid>
|
||||
|
||||
@@ -6,6 +6,15 @@ Imports EgtWPFLib5
|
||||
Public Class ModifStartEndWjWindowVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_Title As String = String.Empty
|
||||
Public Property Title As String
|
||||
Get
|
||||
Return m_Title
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Title = value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property ValueMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_SPLITPAGEUC + 35)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="ModifyQualityV"
|
||||
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"
|
||||
IsMinimizable="False"
|
||||
ShowInTaskbar="False"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
SizeToContent="Height" Width="270"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
|
||||
<StackPanel Margin="5,5,5,0">
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<TextBlock Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}" Text="{Binding ValueMsg}"/>
|
||||
<ComboBox ItemsSource="{Binding QualityList}"
|
||||
SelectedItem="{Binding SelectedQuality}"
|
||||
Style="{StaticResource MachiningsComboBox}"
|
||||
Grid.Column="2" Grid.Row="1" Margin="10,5,10,0"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<Button Name="OkBtn" Content="{Binding OkMsg}" Grid.Column="1"
|
||||
Style="{DynamicResource CompoWindow_Button}">
|
||||
</Button>
|
||||
<Button Content="{Binding ExitMsg}" Grid.Column="3"
|
||||
IsCancel="True"
|
||||
Style="{DynamicResource CompoWindow_Button}">
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,6 @@
|
||||
Public Class ModifyQualityV
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,61 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Public Class ModifyQualityVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_Title As String = String.Empty
|
||||
Public Property Title As String
|
||||
Get
|
||||
Return m_Title
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Title = value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property ValueMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_SPLITPAGEUC + 35)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OkMsg As String
|
||||
Get
|
||||
Return EgtMsg(91651) 'Ok
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ExitMsg As String
|
||||
Get
|
||||
Return EgtMsg(91652) 'Annulla
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_QualityList As New ObservableCollection(Of String)
|
||||
|
||||
Public Property QualityList As ObservableCollection(Of String)
|
||||
Get
|
||||
Return m_QualityList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of String))
|
||||
m_QualityList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SelectedQuality As String
|
||||
|
||||
Public Property SelectedQuality As String
|
||||
Get
|
||||
Return m_SelectedQuality
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_SelectedQuality = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -3,96 +3,108 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
|
||||
<StackPanel IsEnabled="{Binding MoveRawModeIsEnabled}">
|
||||
|
||||
<Grid HorizontalAlignment="Center"
|
||||
<StackPanel IsEnabled="{Binding MoveRawModeIsEnabled}">
|
||||
<Border Margin="0,0,0,5" Style="{StaticResource Border}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="0.5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="0.5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="0.5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="0.5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="0.5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
<Button Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OptionPanel_MoveButton}"
|
||||
Command="{Binding UpCommand}">
|
||||
<Image Source="/Resources/NestingTab/UpArrow.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
<Image Source="/Resources/NestingTab/UpArrow.png"
|
||||
Width="45" Height="45" HorizontalAlignment="Center"/>
|
||||
</Button>
|
||||
<Button Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OptionPanel_MoveButton}"
|
||||
Command="{Binding LeftCommand}"
|
||||
Visibility="{Binding LRArrowVisibility}">
|
||||
<Image Source="/Resources/NestingTab/LeftArrow.png"/>
|
||||
</Button>
|
||||
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="2" Grid.Row="2" Width="40"
|
||||
<Image Source="/Resources/NestingTab/LeftArrow.png"
|
||||
Width="45" Height="45" HorizontalAlignment="Center"/>
|
||||
</Button>
|
||||
|
||||
<TextBox Grid.Column="2" Grid.Row="2" Width="40" Height="20"
|
||||
Text="{Binding MoveStep}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalContentAlignment="Right"/>
|
||||
|
||||
<Button Grid.Column="4" Grid.Row="2"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
HorizontalAlignment="Center"
|
||||
HorizontalContentAlignment="right"
|
||||
Background="{StaticResource Omag_Black}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
VerticalAlignment="Center"/>
|
||||
|
||||
<Button Grid.Column="4" Grid.Row="2"
|
||||
Style="{StaticResource OptionPanel_MoveButton}"
|
||||
Command="{Binding RightCommand}"
|
||||
Visibility="{Binding LRArrowVisibility}">
|
||||
<Image Source="/Resources/NestingTab/RightArrow.png"/>
|
||||
</Button>
|
||||
<Image Source="/Resources/NestingTab/RightArrow.png"
|
||||
Width="45" Height="45" HorizontalAlignment="Center"/>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="2" Grid.Row="4"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
<Button Grid.Column="2" Grid.Row="4"
|
||||
Style="{StaticResource OptionPanel_MoveButton}"
|
||||
Command="{Binding DownCommand}">
|
||||
<Image Source="/Resources/NestingTab/DownArrow.png"/>
|
||||
</Button>
|
||||
<Image Source="/Resources/NestingTab/DownArrow.png"
|
||||
Width="45" Height="45" HorizontalAlignment="Center"/>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
<Button Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OptionPanel_MoveButton}"
|
||||
Command="{Binding CcwRotCommand}"
|
||||
Visibility="{Binding RotationVisibility}">
|
||||
<Image Source="/Resources/NestingTab/CounterClockwiseRotate.png"
|
||||
Width="64" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<Grid Name="RotationAngle" Grid.Column="2" Grid.Row="6"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Visibility="{Binding RotationVisibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding RotationStep}" Width="40"/>
|
||||
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||
Text="°"/>
|
||||
</Grid>
|
||||
|
||||
<Button Grid.Column="4" Grid.Row="6"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding CwRotCommand}"
|
||||
Visibility="{Binding RotationVisibility}">
|
||||
<Image Source="/Resources/NestingTab/ClockwiseRotate.png"
|
||||
<Image Source="/Resources/NestingTab/CounterClockwiseRotate.png"
|
||||
Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
<Grid Name="RotationAngle" Grid.Column="2" Grid.Row="6"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Visibility="{Binding RotationVisibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Text="{Binding RotationStep}" Width="40" Height="20"
|
||||
HorizontalAlignment="center"
|
||||
HorizontalContentAlignment="right"
|
||||
Background="{StaticResource Omag_Black}"
|
||||
Foreground="{StaticResource Omag_White}"/>
|
||||
<TextBlock Grid.Column="1" FontSize="25" Margin="2,-5,0,0"
|
||||
Foreground="{StaticResource Omag_White}" Text="°"/>
|
||||
</Grid>
|
||||
|
||||
<Button Grid.Column="2" Grid.Row="4"
|
||||
<Button Grid.Column="4" Grid.Row="6"
|
||||
Style="{StaticResource OptionPanel_MoveButton}"
|
||||
Command="{Binding CwRotCommand}"
|
||||
Visibility="{Binding RotationVisibility}">
|
||||
<Image Source="/Resources/NestingTab/ClockwiseRotate.png"
|
||||
Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<Button Grid.Column="2" Grid.Row="4"
|
||||
Content="{Binding RemoveMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding RemovePartCommand}"
|
||||
Margin="0,0,0,5"/>
|
||||
Margin="0,5,0,5"/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -17,6 +17,7 @@ Public Class MoveRawModeVM
|
||||
Private m_bRemovedRaw As Boolean = False ' flag per rimozione manuale pezzi
|
||||
Private m_RawMoveDataList As New List(Of RawMoveData) ' dati di movimento
|
||||
Private m_bRawWithCups As Boolean = False ' flag per pezzo corrente con ventose
|
||||
Private m_CurrRawOnVacuum As Integer = GDB_ID.NULL ' identificativo pezzo correntemente attaccato alle ventose
|
||||
|
||||
Private m_dMoveStep As Double
|
||||
Public Property MoveStep As String
|
||||
@@ -108,6 +109,17 @@ Public Class MoveRawModeVM
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Function InitMoveRaw() As Boolean
|
||||
'' verifico che il pezzo sia depositabile
|
||||
'If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' ' mantengo la selezione del pezzo
|
||||
' EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
' OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_)
|
||||
' EgtDraw()
|
||||
' ' non cambio pagina
|
||||
' Return False
|
||||
'End If
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Recupero i tagli allungati prima definiti
|
||||
@@ -158,14 +170,14 @@ Public Class MoveRawModeVM
|
||||
' Distanza iniziale
|
||||
m_dCurrDist = 0
|
||||
End If
|
||||
' Non dovrebbe mai accadere, ma inizializzo con default
|
||||
' Non dovrebbe mai accadere, ma inizializzo con default
|
||||
Else
|
||||
m_vtDir = Vector3d.Y_AX()
|
||||
m_ptMid = Point3d.ORIG()
|
||||
m_dOrigDist = 0
|
||||
m_dCurrDist = 0
|
||||
End If
|
||||
' Altrimenti movimento con ventose
|
||||
' Altrimenti movimento con ventose
|
||||
Else
|
||||
m_bRemovedRaw = False
|
||||
m_bRawWithCups = False
|
||||
@@ -182,7 +194,7 @@ Public Class MoveRawModeVM
|
||||
If OmagOFFICEMap.refMachiningTabVM.ByHand Then
|
||||
LRArrowVisibility = Visibility.Hidden
|
||||
RotationVisibility = Visibility.Hidden
|
||||
' Altrimenti per movimento con ventose
|
||||
' Altrimenti per movimento con ventose
|
||||
Else
|
||||
LRArrowVisibility = Visibility.Visible
|
||||
RotationVisibility = If(CurrentMachine.bRawSplMovRotate, Visibility.Visible, Visibility.Hidden)
|
||||
@@ -195,6 +207,17 @@ Public Class MoveRawModeVM
|
||||
End Function
|
||||
|
||||
Friend Function ExitMoveRaw() As Boolean
|
||||
' verifico che il pezzo sia depositabile
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_)
|
||||
EgtDraw()
|
||||
' non cambio pagina
|
||||
Return False
|
||||
End If
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Se movimento con ventose
|
||||
@@ -249,6 +272,141 @@ Public Class MoveRawModeVM
|
||||
NotifyPropertyChanged("MoveStep")
|
||||
End Sub
|
||||
|
||||
' verifica che la posizione di rialascio sia corretta, altrimenti coreggo il vettore di posizione
|
||||
Private Function VerifyReleasdPositionIsValid(ByRef vtMove As Vector3d) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' determino il punto finale dello spostamento
|
||||
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
|
||||
ptEndPointLift.x += vtMove.x
|
||||
ptEndPointLift.y += vtMove.y
|
||||
Dim sInfo As String = String.Empty
|
||||
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, VacuumCups.dDegRotStartAng)
|
||||
Case 1
|
||||
' extra corsa sulla x-: devo ridurre del valore di extra corsa
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, 3, MSG_TYPE.WARNING) 'Extracorsa ...
|
||||
ptEndPointLift.x -= vtMove.x
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
||||
vtMove.x = 0
|
||||
Else
|
||||
vtMove.x -= dMaxMove - EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.x += vtMove.x
|
||||
bOk = False
|
||||
Case 2
|
||||
' extra corsa sulla x+: devo ridurre del valore di extra corsa
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, 3, MSG_TYPE.WARNING) 'Extracorsa ...
|
||||
ptEndPointLift.x -= vtMove.x
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
||||
vtMove.x = 0
|
||||
Else
|
||||
vtMove.x -= dMaxMove + EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.x += vtMove.x
|
||||
bOk = False
|
||||
Case 4
|
||||
' extra corsa sulla y-
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, 3, MSG_TYPE.WARNING) 'Extracorsa ...
|
||||
ptEndPointLift.y -= vtMove.y
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
||||
vtMove.y = 0
|
||||
Else
|
||||
vtMove.y -= dMaxMove - EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.y += vtMove.y
|
||||
bOk = False
|
||||
Case 8
|
||||
' extra corsa sulla y+
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, 3, MSG_TYPE.WARNING) 'Extracorsa ...
|
||||
ptEndPointLift.y -= vtMove.y
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
||||
vtMove.y = 0
|
||||
Else
|
||||
vtMove.y -= dMaxMove + EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.y += vtMove.y
|
||||
bOk = False
|
||||
End Select
|
||||
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
|
||||
VacuumCups.ptStartPointLift = ptEndPointLift
|
||||
Return bOk
|
||||
End Function
|
||||
' verifica che la posizione di rialascio sia corretta, altrimenti coreggo l'angolo di posizione
|
||||
Private Function VerifyReleasdAngleIsValid(ByRef dAngDeg As Double, ByVal ptCenter As Point3d) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' determino il punto finale dello spostamento
|
||||
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
|
||||
Dim dDegRotEndAng As Double = VacuumCups.dDegRotStartAng + dAngDeg
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
||||
Dim sInfo As String = String.Empty
|
||||
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, dDegRotEndAng)
|
||||
Case 16
|
||||
' extra corsa sulla c-
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, 3, MSG_TYPE.WARNING) 'Extracorsa ...
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
|
||||
dDegRotEndAng -= dAngDeg
|
||||
dAngDeg += VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
||||
dDegRotEndAng += dAngDeg
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
||||
bOk = False
|
||||
Case 34
|
||||
' extra corsa sulla c+
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, 3, MSG_TYPE.WARNING) 'Extracorsa ...
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
|
||||
dDegRotEndAng -= dAngDeg
|
||||
dAngDeg -= VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
||||
dDegRotEndAng += dAngDeg
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
||||
bOk = False
|
||||
End Select
|
||||
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
|
||||
VacuumCups.ptStartPointLift = ptEndPointLift
|
||||
VacuumCups.dDegRotStartAng = dDegRotEndAng
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' Veririfica che il grezzo non entri in colliosione con altri pezzi
|
||||
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer) As Boolean
|
||||
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||
' Creo gruppo temporaneo in cui generare le superfici per la veririfica di collisione
|
||||
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
If m_nTempId = GDB_ID.NULL Then Return False
|
||||
EgtSetName(m_nTempId, "RawTemp")
|
||||
Dim nIdActualRawOutLine As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawOutline")
|
||||
Dim ActualRawFlatRegion As Integer = EgtCreateSurfFlatRegion(m_nTempId, nIdActualRawOutLine)
|
||||
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||
Dim nRawGroupId = EgtGetParent(EgtGetFirstRawPart())
|
||||
Dim nIdRaw As Integer = EgtGetFirstRawPart()
|
||||
' ciclo su tutti i grezzi per veririficare eventuali collisioni
|
||||
While nIdRaw <> GDB_ID.NULL
|
||||
' verifico la fase del grezzo
|
||||
If EgtVerifyRawPartCurrPhase(nIdRaw) And nIdOnVacumm <> nIdRaw Then
|
||||
' recupero il contorno del pezzo
|
||||
Dim nIdRawOutLine As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawOutline")
|
||||
Dim nIdRawFlatRegion As Integer = EgtCreateSurfFlatRegion(m_nTempId, nIdRawOutLine)
|
||||
If EgtSurfFrIntersect(nIdRawFlatRegion, ActualRawFlatRegion) Then
|
||||
If EgtExistsObj(nIdRawFlatRegion) Then
|
||||
EgtErase(m_nTempId)
|
||||
' esiste una intersezione delle superfici
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nIdRaw = EgtGetNextRawPart(nIdRaw)
|
||||
End While
|
||||
EgtErase(m_nTempId)
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -286,9 +444,15 @@ Public Class MoveRawModeVM
|
||||
Else
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(0, m_dMoveStep, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
||||
End If
|
||||
Else
|
||||
' Pezzo troppo piccolo : non si può muovere
|
||||
@@ -320,9 +484,15 @@ Public Class MoveRawModeVM
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(-m_dMoveStep, 0, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
||||
End If
|
||||
Else
|
||||
' Pezzo troppo piccolo : non si può muovere
|
||||
@@ -353,9 +523,15 @@ Public Class MoveRawModeVM
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(m_dMoveStep, 0, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
||||
End If
|
||||
Else
|
||||
' Pezzo troppo piccolo : non si può muovere
|
||||
@@ -403,9 +579,15 @@ Public Class MoveRawModeVM
|
||||
Else
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(0, -m_dMoveStep, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
||||
End If
|
||||
Else
|
||||
' Pezzo troppo piccolo : non si può muovere
|
||||
@@ -437,12 +619,19 @@ Public Class MoveRawModeVM
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim dAng As Double = m_dRotationStep
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
VerifyReleasdAngleIsValid(dAng, ptRawCen)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAng) Then
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
EgtRotate(GetVacuumId(), ptRawCen, Vector3d.Z_AX(), dAng, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
|
||||
VacuumCups.dDegRotStartAng -= dAng
|
||||
End If
|
||||
Else
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2), 3, MSG_TYPE.WARNING)
|
||||
@@ -472,12 +661,19 @@ Public Class MoveRawModeVM
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim dAng As Double = -m_dRotationStep
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
VerifyReleasdAngleIsValid(dAng, ptRawCen)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAng) Then
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
EgtRotate(GetVacuumId(), ptRawCen, Vector3d.Z_AX(), dAng, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
|
||||
VacuumCups.dDegRotStartAng -= dAng
|
||||
End If
|
||||
Else
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2), 3, MSG_TYPE.WARNING)
|
||||
@@ -545,17 +741,49 @@ Public Class MoveRawModeVM
|
||||
' Se trovato il grezzo
|
||||
If nParentId = nRawGroupId Then
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
' Se il pezzo corrente è selezionato allora lo disattivo -> deposito del pezzo
|
||||
EgtGetStatus(nId, nStat)
|
||||
If nStat = GDB_ST.SEL Then
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
' Se con ventose, le nascondo
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.ByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola
|
||||
If VerifyCollisionWithOtherRawPart(nId) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91231), 3, MSG_TYPE.ERROR_) ' Collisione pezzi
|
||||
Else
|
||||
' Se con ventose, le nascondo
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.ByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
' verifico che il pezzo precedente possa essere depositato correttamente
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91231), 3, MSG_TYPE.ERROR_) ' Collisione pezzi
|
||||
EgtDraw()
|
||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||
Exit While
|
||||
End If
|
||||
' salvo l'indice del pezzo correntemente attaccato alle ventose
|
||||
m_CurrRawOnVacuum = nId
|
||||
|
||||
EgtDeselectAll()
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
' Se con ventose, le posiziono sul grezzo
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.ByHand Then
|
||||
Dim rmData As New RawMoveData
|
||||
' inizializzo i dati del grezzo per il cacolo del peso
|
||||
Dim MaxSinglePlugger As Double = 250
|
||||
MaxSinglePlugger = GetPrivateProfileDouble(S_MACH_RAWMOVE, K_MACH_WEIGHT_SINGLEPLUGGER, MaxSinglePlugger, sMachIniFile)
|
||||
Dim MaxDoublePlugger As Double = 750
|
||||
MaxDoublePlugger = GetPrivateProfileDouble(S_MACH_RAWMOVE, K_MACH_WEIGHT_DOUBLEPLUGGER, MaxDoublePlugger, sMachIniFile)
|
||||
Dim AverageDensity As Double = 2700
|
||||
AverageDensity = GetPrivateProfileDouble(S_MATERIALS, K_AVERAGEDENSITY, AverageDensity, sMachIniFile)
|
||||
VacuumCups.GetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
|
||||
VacuumCups.GetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, sMachIniFile) <> 0)
|
||||
VacuumCups.GetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, sMachIniFile) <> 0)
|
||||
If PutVacuumCupsOnRaw(nId, rmData) Then
|
||||
' Visualizzo le ventose
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
|
||||
@@ -565,10 +793,19 @@ Public Class MoveRawModeVM
|
||||
' Reset eventuale messaggio
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
Else
|
||||
' Visualizzo le ventose
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
' Aggiorno i dati
|
||||
m_bRawWithCups = False
|
||||
' Messaggio di avvertimento (Pezzo troppo piccolo : non si può muovere)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2), 3, MSG_TYPE.WARNING)
|
||||
If VacuumCups.bOverWeight Then
|
||||
' Messaggio di avvertimento (Pezzo troppo piccolo : non si può muovere)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_MOVERAWPAGEUC + 4), 3, MSG_TYPE.WARNING)
|
||||
ElseIf VacuumCups.bExtraStroke Then
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_MOVERAWPAGEUC + 5), 3, MSG_TYPE.WARNING) 'Pezzo oltre le corse : non si può muovere
|
||||
Else
|
||||
' Messaggio di avvertimento (Pezzo troppo piccolo : non si può muovere)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2), 3, MSG_TYPE.WARNING)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -577,6 +814,15 @@ Public Class MoveRawModeVM
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
|
||||
' clicco su un oggetto che non è un grezzo -> verifico che il pezzo precedente possa essere depositato correttamente
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91231), 3, MSG_TYPE.ERROR_) ' Collisione pezzi
|
||||
EgtDraw()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
@@ -1,200 +1,628 @@
|
||||
<UserControl x:Class="SplitModeV"
|
||||
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"
|
||||
Background="Transparent">
|
||||
|
||||
<StackPanel IsEnabled="{Binding SplitModeIsEnabled}">
|
||||
<UserControl.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding SplitCutCommand}" />
|
||||
</UserControl.InputBindings>
|
||||
|
||||
<ListBox ItemsSource="{Binding ItemList}"
|
||||
DisplayMemberPath="Name"
|
||||
<StackPanel IsEnabled="{Binding SplitModeIsEnabled}">
|
||||
|
||||
<Border Margin="0,0,0,5" Style="{StaticResource BorderSplit}" Padding="0">
|
||||
<ListBox ItemsSource="{Binding ItemList}"
|
||||
Background="{StaticResource Omag_Gray}"
|
||||
SelectionMode="Extended"
|
||||
Height="250" Margin="0,0,0,5">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_Gray}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
BorderThickness="0"
|
||||
Height="200" Margin="0,0,0,0">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<Image Margin="1" Height="20" Width="20"
|
||||
Source="{Binding SourceImg}">
|
||||
</Image>
|
||||
<TextBlock Margin="1" Text="{Binding Name}"/>
|
||||
<StackPanel.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick"
|
||||
Command="{Binding Path=DataContext.OnOffCommand,
|
||||
RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor }}"/>
|
||||
</StackPanel.InputBindings>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
<Setter Property="FontStyle" Value="Oblique"/>
|
||||
<Setter Property="FontWeight" Value="Light"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_Black}"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Border>
|
||||
|
||||
<Grid Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,0,0,2.5">
|
||||
|
||||
<Button Grid.Column="1"
|
||||
<Button
|
||||
IsEnabled="{Binding bEnabledCommandMove}"
|
||||
Style="{StaticResource OptionPanel_Button}"
|
||||
Command="{Binding MoveUpCommand}">
|
||||
<Image Source="/Resources/MachiningTab/UpArrow.png"/>
|
||||
</Button>
|
||||
<Button Grid.Column="2"
|
||||
Command="{Binding MoveUpCommand}"
|
||||
Margin="0,0,0.5,0">
|
||||
<Image Source="/Resources/NestingTab/UpArrow.png"/>
|
||||
</Button>
|
||||
<Button
|
||||
IsEnabled="{Binding bEnabledCommandMove}"
|
||||
Style="{StaticResource OptionPanel_Button}"
|
||||
Command="{Binding MoveDownCommand}">
|
||||
<Image Source="/Resources/MachiningTab/DownArrow.png"/>
|
||||
</Button>
|
||||
Command="{Binding MoveDownCommand}"
|
||||
Margin="0.5,0,0,0">
|
||||
<Image Source="/Resources/NestingTab/DownArrow.png"/>
|
||||
</Button>
|
||||
<ToggleButton ToolTip="{Binding LayNbArrTgBtnMsg}"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding LayNbArrTgBtn_IsChecked}"
|
||||
Height="20" Width="20"
|
||||
Margin="10,0,1,0">
|
||||
<Image Source="{Binding LayNbArrTgBtnImg}"/>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
|
||||
<Expander Name="myExpander1" Background="Transparent"
|
||||
Foreground="{DynamicResource Omag_White}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="{Binding EnableCutMsg}"
|
||||
ExpandDirection="Down" IsExpanded="{Binding bOnOffCut_IsExpanded}">
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="2,2.5,2,0">
|
||||
|
||||
<Border Margin="0,0,0,5" Style="{StaticResource Border}">
|
||||
|
||||
<UniformGrid Columns="3">
|
||||
|
||||
<Button Content="{Binding OnOffMsg}"
|
||||
<!--<Button Content="{Binding OnOffMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding OnOffCommand}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Content="{Binding AllOnMsg}"
|
||||
Margin="0,0,2.5,0"/>-->
|
||||
<StackPanel Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding OnOffMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding OnOffCommand}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/ON_OFF-singolo-taglio.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<!--<Button Content="{Binding AllOnMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllOnCommand}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<Button Content="{Binding AllOffMsg}"
|
||||
Margin="2.5,0,2.5,0"/>-->
|
||||
<StackPanel Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding AllOnMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding AllOnCommand}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Tutti-ON.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<!--<Button Content="{Binding AllOffMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllOffCommand}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
Margin="2.5,0,0,0"/>-->
|
||||
<StackPanel Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding AllOffMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding AllOffCommand}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Tutti-OFF.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
|
||||
</Border>
|
||||
</Expander>
|
||||
</Border>
|
||||
|
||||
<Border Margin="0,0,0,5" Style="{StaticResource Border}">
|
||||
|
||||
<StackPanel>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
|
||||
<Expander Name="myExpander2" Background="Transparent"
|
||||
Foreground="{DynamicResource Omag_White}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="{Binding SplitCutMsg}"
|
||||
ExpandDirection="Down" IsExpanded="{Binding bSpLitCut_IsExpanded}">
|
||||
|
||||
<Button Content="{Binding CutMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
<StackPanel Margin="0,0,0,-2.5">
|
||||
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,2.5,0,1">
|
||||
<Grid>
|
||||
<!--<Button Content="{Binding CutMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutCommand}"
|
||||
Visibility="{Binding CutBtnVisibility}"
|
||||
Margin="0,0,2.5,0"/>-->
|
||||
<StackPanel Visibility="{Binding CutBtnVisibility}" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding CutMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding CutCommand}"
|
||||
Visibility="{Binding CutBtnVisibility}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Content="{Binding CutStartMsg}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Allunga-o-accorcia.png"
|
||||
Height="40" Margin="0,2,0,0"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<!--<ToggleButton Grid.Row="0"
|
||||
Content="{Binding BridgeMsg}"
|
||||
Style="{StaticResource OptionPanel_ToggleWrapButton}"
|
||||
IsChecked="{Binding BridgeBtn_IsChecked}"
|
||||
Visibility="{Binding BridgeBtnVisibility}"
|
||||
Margin="0,0,2.5,0" Padding="0"/>-->
|
||||
<StackPanel Visibility="{Binding BridgeBtnVisibility}" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="{Binding BridgeMsg}"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding BridgeBtn_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Ponticelli.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid>
|
||||
<!--<Button Content="{Binding CutStartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutStartCommand}"
|
||||
Visibility="{Binding CutStartBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<Button Content="{Binding CutEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutEndCommand}"
|
||||
Visibility="{Binding CutEndBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
</UniformGrid>
|
||||
Margin="2.5,0,2.5,0"/>-->
|
||||
<StackPanel Visibility="{Binding CutStartBtnVisibility}" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding CutStartMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding CutStartCommand}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Inizio-allunga-o-accorcia.png"
|
||||
Height="40" Margin="0,2,0,0"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Visibility="{Binding AllExtRedVisibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Content="{Binding AllExtendMsg}" Grid.Column="1"
|
||||
<!--<Button Content="{Binding QualityMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding QualityCommand}"
|
||||
Visibility="{Binding QualityBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>!-->
|
||||
<StackPanel Visibility="{Binding QualityBtnVisibility}" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding QualityMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding QualityCommand}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Quality.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid>
|
||||
<StackPanel Visibility="{Binding CutEndBtnVisibility}" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding CutEndMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding CutEndCommand}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Fine-allunga-o-accorcia.png"
|
||||
Height="40" Margin="0,2,0,0"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Visibility="{Binding BridgeDeleteBtnVisibility}" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="{Binding BridgeDeleteMsg}"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding BridgeDeleteBtn_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Ponticelli_delete.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,2.5,0,1">
|
||||
|
||||
<!--Bottone invisibile per permetter il corretto allineamento-->
|
||||
<!--
|
||||
<Button Content="{Binding }" Grid.Column="0"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding }"
|
||||
Visibility="Hidden"
|
||||
Margin="0,0,1,0"/>-->
|
||||
|
||||
|
||||
|
||||
<StackPanel Visibility="{Binding AllExtendBtnVisibility}" Grid.Column="2" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding AllExtendMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding AllExtendCommand}"
|
||||
Visibility="{Binding AllExtendBtnVisibility}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Content="{Binding AllReduceMsg}" Grid.Column="2"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Tutti-allunga.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Visibility="{Binding AllReduceBtnVisibility}" Grid.Column="2" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding AllReduceMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding AllReduceCommand}"
|
||||
Visibility="{Binding AllReduceBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Tutti-accorcia.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Border>
|
||||
<!--<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,2.5,0,1">
|
||||
<StackPanel Visibility="{Binding AllExtendBtnVisibility}" Grid.Column="1" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="{Binding AllExtendMsg}"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding CreateCut_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Width="40" Height="40"
|
||||
Margin="1,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Crea-taglio.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
|
||||
<Border Margin="0,0,0,5" Style="{StaticResource Border}">
|
||||
|
||||
<StackPanel>
|
||||
<StackPanel Visibility="{Binding AllExtendBtnVisibility}" Grid.Column="1" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="{Binding AllExtendMsg}"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding RemoveCut_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Width="40" Height="40"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Rimuovi-taglio.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
<StackPanel Visibility="{Binding AllExtendBtnVisibility}" Grid.Column="1" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="{Binding AllExtendMsg}"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding CreateParallelCut_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Width="40" Height="40"
|
||||
Margin="1,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Crea-taglio-parallelo.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel Visibility="{Binding AllExtendBtnVisibility}" Grid.Column="1" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="{Binding AllExtendMsg}"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding CreateParallelCut_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Width="40" Height="40"
|
||||
Margin="1,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Modifica-taglio.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
</StackPanel>-->
|
||||
|
||||
<Button Content="{Binding OutCenStartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
</StackPanel>
|
||||
|
||||
</Expander>
|
||||
</Border>
|
||||
|
||||
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
|
||||
<Expander Name="myExpander3" Background="Transparent"
|
||||
Foreground="{DynamicResource Omag_White}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="{Binding DirectSplitCutMsg}"
|
||||
ExpandDirection="Down" IsExpanded="{Binding bDirectSpLitCut_IsExpanded}">
|
||||
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,2.5,0,1">
|
||||
<StackPanel Grid.Column="1" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="Crea"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding CreateCut_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Width="40" Height="40"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Linea.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="Elimina"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding RemoveCut_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Width="40" Height="40"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Linea-Elimina.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="Copia"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding CreateParallelCut_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Width="40" Height="40"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Linea-Copia.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="Muovi"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding ModifyCut_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Width="40" Height="40"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Linea-Muovi.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</Expander>
|
||||
</Border>
|
||||
|
||||
<Border Style="{StaticResource Border}" Margin="0,1,0,0">
|
||||
<Expander Name="myExpander4" Background="Transparent"
|
||||
Foreground="{DynamicResource Omag_White}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="{Binding ManageStartEndCutMsg}"
|
||||
ExpandDirection="Down" IsExpanded="{Binding bModifyCut_IsExpanded}">
|
||||
|
||||
<StackPanel Margin="0,0,0,-2.5">
|
||||
<UniformGrid Columns="4" Margin="0,2.5,0,1">
|
||||
<StackPanel Visibility="{Binding OutCenStartBtnVisibility}" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding OutCenStartMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding OutCenStartCommand}"
|
||||
Visibility="{Binding OutCenStartBtnVisibility}"
|
||||
Margin="0,0,2.5,0" Padding="0"/>
|
||||
<Button Content="{Binding AllOutStartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Inizio-centro-fuori.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Visibility="{Binding AllOutStartBtnVisibility}" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding AllOutStartMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding AllOutStartCommand}"
|
||||
Visibility="{Binding AllOutStartBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<Button Content="{Binding AllCenStartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Inizio-tutti-fuori.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Visibility="{Binding AllCenStartBtnVisibility}" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding AllCenStartMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding AllCenStartCommand}"
|
||||
Visibility="{Binding AllCenStartBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
</UniformGrid>
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Inizio-tutti-centro.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
|
||||
<Button Content="{Binding OutCenEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding OutCenEndCommand}"
|
||||
Visibility="{Binding OutCenEndBtnVisibility}"
|
||||
Margin="0,0,2.5,0" Padding="0"/>
|
||||
<Button Content="{Binding AllOutEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllOutEndCommand}"
|
||||
Visibility="{Binding AllOutEndBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<Button Content="{Binding AllCenEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllCenEndCommand}"
|
||||
Visibility="{Binding AllCenEndBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
|
||||
<Button Content="{Binding ModifStartMsg}" Grid.Column="0"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
<StackPanel Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding ModifStartMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding ModifStartCommand}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Modifica-Inizio.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Content="{Binding ModifEndMsg}" Grid.Column="1"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
</StackPanel>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="4" Margin="0,0,0,1">
|
||||
<StackPanel Margin="1,0,0,0" Visibility="{Binding OutCenEndBtnVisibility}">
|
||||
<Button ToolTip="{Binding OutCenEndMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding OutCenEndCommand}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Fine-Centro-Fuori.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Visibility="{Binding AllOutEndBtnVisibility}" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding AllOutEndMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding AllOutEndCommand}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Fine-tutti-fuori.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Visibility="{Binding AllCenEndBtnVisibility}" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding AllCenEndMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding AllCenEndCommand}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Fine-tutti-centro.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<StackPanel Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding ModifEndMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding ModifEndCommand}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Modifica-Fine.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<Button Content="{Binding PauseMsg}" Grid.Column="2"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding PauseCommand}"
|
||||
Visibility="{Binding PauseBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
</UniformGrid>
|
||||
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="4" Margin="0,0,0,1">
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
<!--Bottone invisibile per permetter il corretto allineamento-->
|
||||
<Button Content="{Binding }" Grid.Column="0"
|
||||
<!--Bottone invisibile per permetter il corretto allineamento-->
|
||||
<Button Content="{Binding }" Grid.Column="0"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding }"
|
||||
Visibility="Hidden"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<!--Inverti direzione di taglio-->
|
||||
<Button Content="{Binding InvertMsg}" Grid.Column="0"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Margin="0,0,1,0"/>
|
||||
|
||||
<StackPanel Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding PauseMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding PauseCommand}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Pausa-ON_OFF.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Visibility="{Binding InvertBtnVisibility}" Margin="1,0,0,0">
|
||||
<Button ToolTip="{Binding InvertMsg}"
|
||||
Style="{StaticResource Split_Button_Img}"
|
||||
Command="{Binding InvertCommand}"
|
||||
Visibility="{Binding InvertBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Inverti.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</Border>
|
||||
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="ChangeTableV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" IsClosable="False"
|
||||
Title="{Binding sTitle}" Height="150" Width="320">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ItemsControl ItemsSource="{Binding CurrTableList}">
|
||||
<!--Definisco l'organizzazione dei comandi-->
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<!--Definisco il contenuto del comando-->
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<RadioButton GroupName="TabGrp"
|
||||
IsChecked="{Binding IsActive}"
|
||||
Width="60" Height="60"
|
||||
Style="{DynamicResource ChangeTable_ToggleButton}">
|
||||
<Grid>
|
||||
<!--Nome della tavole: Tab #-->
|
||||
<TextBlock Text="{Binding sName}"
|
||||
HorizontalAlignment="Center"
|
||||
Background="Transparent">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_LightGray}"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsChecked, RelativeSource={RelativeSource AncestorType=RadioButton}}" Value="True">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<!--Rappresentazione di una tavola di lavoro-->
|
||||
<Image Source="{Binding ImgTab}" Margin="0,20,0,0"/>
|
||||
</Grid>
|
||||
|
||||
</RadioButton>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<UniformGrid Grid.Row="1" Columns="2">
|
||||
<Button Content="Ok" Margin="5" Command="{Binding OkCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"/>
|
||||
<Button Content="Cancel" Margin="5" Command="{Binding CancelCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class ChangeTableV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,177 @@
|
||||
Public Class ChangeTableVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_refChanTableV As ChangeTableV
|
||||
|
||||
Public Enum EnumDialogResult
|
||||
OK
|
||||
CANCEL
|
||||
End Enum
|
||||
|
||||
Private m_MyDialogResult As EnumDialogResult
|
||||
Public ReadOnly Property MyDialogResult As EnumDialogResult
|
||||
Get
|
||||
Return m_MyDialogResult
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sTitle As String = "Seleziona tavola di lavoro"
|
||||
Public ReadOnly Property sTitle As String
|
||||
Get
|
||||
Return m_sTitle
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nSelectedTable As Integer = 0
|
||||
Public ReadOnly Property nSelectedTable As Integer
|
||||
Get
|
||||
Return m_nSelectedTable
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_CurrTableList As New List(Of TableToChange)
|
||||
Public ReadOnly Property CurrTableList As List(Of TableToChange)
|
||||
Get
|
||||
Return m_CurrTableList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione Comandi
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(refV As ChangeTableV)
|
||||
m_refChanTableV = refV
|
||||
' Procedo alla creazione della lista delle tavole disponibili
|
||||
Initialized()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Sub Initialized()
|
||||
' recuepero l'inidce della tavola corrente
|
||||
Dim nIndeXCurrTab As Integer = GetCurrentTable()
|
||||
' creo la lista delle tavole disponibili (attivo il bottone della tavola attualmente in uso)
|
||||
For nInd As Integer = 0 To GetTableCount() - 1
|
||||
m_CurrTableList.Add(New TableToChange("Tab", (nInd + 1), ((nInd + 1) = nIndeXCurrTab)))
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "OkCommand"
|
||||
|
||||
Public ReadOnly Property OkCommand() As ICommand
|
||||
Get
|
||||
If m_cmdOk Is Nothing Then
|
||||
m_cmdOk = New Command(AddressOf Ok)
|
||||
End If
|
||||
Return m_cmdOk
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Sub Ok()
|
||||
' recupero l'indice della tavola impostata
|
||||
For Each ItemTab As TableToChange In CurrTableList
|
||||
If ItemTab.IsActive Then
|
||||
m_nSelectedTable = ItemTab.nIndex
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
m_MyDialogResult = EnumDialogResult.OK
|
||||
' procedo alla chiusura della finetra
|
||||
m_refChanTableV.Close()
|
||||
End Sub
|
||||
|
||||
#End Region ' OkCommand
|
||||
|
||||
#Region "CancelCommand"
|
||||
|
||||
Public ReadOnly Property CancelCommand() As ICommand
|
||||
Get
|
||||
If m_cmdCancel Is Nothing Then
|
||||
m_cmdCancel = New Command(AddressOf Cancel)
|
||||
End If
|
||||
Return m_cmdCancel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Sub Cancel()
|
||||
m_MyDialogResult = EnumDialogResult.CANCEL
|
||||
' procedo alla chiusura della finetra
|
||||
m_refChanTableV.Close()
|
||||
End Sub
|
||||
|
||||
#End Region ' CancelCommand
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
Public Class TableToChange
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private Property m_sName As String = "Tab"
|
||||
Public ReadOnly Property sName As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sImgTab As String = "\Resources\NewIcons\table.png"
|
||||
Public ReadOnly Property ImgTab As String
|
||||
Get
|
||||
Return If(m_bIsActive, "\Resources\NewIcons\table.png", "\Resources\NewIcons\tableS.png")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Property m_nIndex As Integer = 3
|
||||
Public ReadOnly Property nIndex As Integer
|
||||
Get
|
||||
Return m_nIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bIsActive As Boolean = False
|
||||
Public Property IsActive As Boolean
|
||||
Get
|
||||
Return m_bIsActive
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsActive = value
|
||||
If m_bIsActive Then
|
||||
m_sImgTab = "\Resources\NewIcons\table.png"
|
||||
Else
|
||||
m_sImgTab = "\Resources\NewIcons\tableS.png"
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(IsActive))
|
||||
NotifyPropertyChanged(NameOf(ImgTab))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Sub New(Name As String, Ind As Integer, IsCurrent As Boolean)
|
||||
m_sName = Name & " " & Ind.ToString
|
||||
m_nIndex = Ind
|
||||
m_bIsActive = IsCurrent
|
||||
NotifyPropertyChanged(NameOf(IsActive))
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,41 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="MultiSelectionV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="{Binding TitleMsg}"
|
||||
IsMinimizable="False"
|
||||
IsClosable="False"
|
||||
ShowInTaskbar="False"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Width="270" Height="150"
|
||||
ResizeMode="NoResize">
|
||||
|
||||
<DockPanel Margin="5,5,5,0">
|
||||
|
||||
<UniformGrid Columns="2"
|
||||
DockPanel.Dock="Top"
|
||||
Margin="0,15,0,15">
|
||||
<TextBlock Text="{Binding SelectionMsg}"/>
|
||||
<TextBox Text="{Binding nNbrOfParts}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="4"
|
||||
DockPanel.Dock="Bottom"
|
||||
Margin="25,0,25,5">
|
||||
<Button Command="{Binding OkCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Content="{Binding OkMsg}">
|
||||
</Button>
|
||||
<ToggleButton Visibility="Hidden" />
|
||||
<ToggleButton Visibility="Hidden" />
|
||||
<Button Command="{Binding CancelCommand}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Content="{Binding CancelMsg}">
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,15 @@
|
||||
Public Class MultiSelectionV
|
||||
|
||||
Private WithEvents m_MultiSelectionVM As MultiSelectionVM
|
||||
|
||||
Sub New(Owner As Window, MultiSelVM As MultiSelectionVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = MultiSelVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_MultiSelectionVM = MultiSelVM
|
||||
Me.Show()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,96 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MultiSelectionVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_sRefGuidOfPart As String = String.Empty
|
||||
|
||||
Public ReadOnly Property TitleMsg As String
|
||||
Get
|
||||
Return EgtMsg(91681) ' Multiple selection
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SelectionMsg As String
|
||||
Get
|
||||
Return EgtMsg(91682) ' Number of Parts
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OkMsg As String
|
||||
Get
|
||||
Return EgtMsg(91651) ' Ok
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CancelMsg As String
|
||||
Get
|
||||
Return EgtMsg(91652) ' Cancel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_MultiSelectionV As MultiSelectionV
|
||||
Public Sub SetMultiSelectionV(MultiSel As MultiSelectionV)
|
||||
m_MultiSelectionV = MultiSel
|
||||
End Sub
|
||||
|
||||
Private m_nNbrOfParts As Integer
|
||||
Public Property nNbrOfParts As String
|
||||
Get
|
||||
Return m_nNbrOfParts.ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim nVal As Integer = 0
|
||||
StringToInt(value, nVal)
|
||||
m_nNbrOfParts = nVal
|
||||
NotifyPropertyChanged("nNbrOfParts")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
|
||||
Public ReadOnly Property OkCommand As ICommand
|
||||
Get
|
||||
If m_cmdOk Is Nothing Then
|
||||
m_cmdOk = New Command(AddressOf OkCmd)
|
||||
End If
|
||||
Return m_cmdOk
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub OkCmd(ByVal param As Object)
|
||||
' il numero di elementi indicato è corretto
|
||||
' deseleziono il pezzo corrente
|
||||
DeselectPartInFaimily(m_sRefGuidOfPart)
|
||||
Select Case m_nNbrOfParts
|
||||
Case 0 ' Annulla
|
||||
' continuo senza eseguire niente
|
||||
Case Else
|
||||
' seleziono il numero di pezzi indicati
|
||||
SelectPartInFaimily(m_sRefGuidOfPart, m_nNbrOfParts)
|
||||
End Select
|
||||
' chiudo la finestra
|
||||
m_MultiSelectionV.Close()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property CancelCommand As ICommand
|
||||
Get
|
||||
If m_cmdCancel Is Nothing Then
|
||||
m_cmdCancel = New Command(AddressOf CancelCmd)
|
||||
End If
|
||||
Return m_cmdCancel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub CancelCmd(ByVal param As Object)
|
||||
' chiudo la fiestra senza eseguire niente
|
||||
m_MultiSelectionV.Close()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Sub New(CurrNumberOfParts As Integer, sRefGuid As String)
|
||||
m_nNbrOfParts = CurrNumberOfParts
|
||||
m_sRefGuidOfPart = sRefGuid
|
||||
End Sub
|
||||
End Class
|
||||
@@ -4,188 +4,336 @@
|
||||
xmlns:EgtWPFLib5 ="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Margin="5,5,5,0">
|
||||
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
|
||||
<GroupBox Header="{Binding DrawingMsg}" Style="{StaticResource GroupBoxSplit}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Margin="0,2.5,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource DrawImport_NestingButton}"
|
||||
Command="{Binding DrawCommand}">
|
||||
<Image Source="/Resources/NestingTab/Draw.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
<Image Source="/Resources/NestingTab/Draw.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource DrawImport_NestingButton}"
|
||||
Command="{Binding ImportDxfCommand}">
|
||||
<Image Source="/Resources/NestingTab/ImportDxf.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<ToggleButton Grid.Column="4" Grid.Row="0"
|
||||
Style="{StaticResource OptionPanel_NestingToggleButton}"
|
||||
<Image Source="/Resources/NestingTab/ImportDxf.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<ToggleButton Grid.Column="4" Grid.Row="0"
|
||||
Style="{StaticResource DrawImport_NestingToggleButton}"
|
||||
IsChecked="{Binding CsvImport_IsChecked}">
|
||||
<Image Source="/Resources/NestingTab/ImportCsv.png" Stretch="Uniform"/>
|
||||
</ToggleButton>
|
||||
<Image Source="/Resources/NestingTab/ImportCsv.png" Stretch="Uniform"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<Border Margin="0,0,0,5" Style="{StaticResource Border}">
|
||||
<Border Margin="0,5,0,5" Style="{StaticResource Border}">
|
||||
|
||||
<Grid HorizontalAlignment="Center"
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
Margin="0,0,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--<TextBlock Name="PositioningLbl" Grid.ColumnSpan="3" VerticalAlignment="Center"
|
||||
<!--<TextBlock Name="PositioningLbl" Grid.ColumnSpan="3" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center" FontSize="15" />-->
|
||||
<Button Grid.Column="0" Grid.Row="0"
|
||||
<Button Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OptionPanel_NestingButton}" Width="48" Height="48"
|
||||
Command="{Binding PartRotOnCommand}">
|
||||
<Image Source="/Resources/NestingTab/PartRotOn.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="2" Grid.Row="0"
|
||||
<Image Source="/Resources/NestingTab/PartRotOn.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding UpCommand}">
|
||||
<Image Source="/Resources/NestingTab/UpArrow.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="4" Grid.Row="0"
|
||||
<Image Source="/Resources/NestingTab/UpArrow.png"
|
||||
Width="40"/>
|
||||
</Button>
|
||||
<Button Grid.Column="4" Grid.Row="0"
|
||||
Style="{StaticResource OptionPanel_NestingButton}" Width="48" Height="48"
|
||||
Command="{Binding PartRotOffCommand}">
|
||||
<Image Source="/Resources/NestingTab/PartRotOff.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="0" Grid.Row="2"
|
||||
<Image Source="/Resources/NestingTab/PartRotOff.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding LeftCommand}">
|
||||
<Image Source="/Resources/NestingTab/LeftArrow.png"/>
|
||||
</Button>
|
||||
<ToggleButton Grid.Column="2" Grid.Row="2"
|
||||
<Image Source="/Resources/NestingTab/LeftArrow.png"
|
||||
Width="40"/>
|
||||
</Button>
|
||||
<ToggleButton Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OptionPanel_NestingToggleButton}"
|
||||
IsChecked="{Binding MaxMoveIsChecked}">
|
||||
<Image Source="/Resources/NestingTab/MaxMove.png"/>
|
||||
</ToggleButton>
|
||||
<Button Grid.Column="4" Grid.Row="2"
|
||||
<Image Source="/Resources/NestingTab/MaxMove.png"/>
|
||||
</ToggleButton>
|
||||
<Button Grid.Column="4" Grid.Row="2"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding RightCommand}">
|
||||
<Image Source="/Resources/NestingTab/RightArrow.png"/>
|
||||
</Button>
|
||||
<Image Source="/Resources/NestingTab/RightArrow.png"
|
||||
Width="40"/>
|
||||
</Button>
|
||||
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="0" Grid.Row="4" Width="40"
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="0" Grid.Row="4" Width="40"
|
||||
Text="{Binding StepMove}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalContentAlignment="Right"/>
|
||||
|
||||
<Button Grid.Column="2" Grid.Row="4"
|
||||
<Button Grid.Column="2" Grid.Row="4"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding DownCommand}">
|
||||
<Image Source="/Resources/NestingTab/DownArrow.png"/>
|
||||
</Button>
|
||||
<Image Source="/Resources/NestingTab/DownArrow.png"
|
||||
Width="40"/>
|
||||
</Button>
|
||||
|
||||
<Grid Grid.Column="4" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="4" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding RotationAngle}" Width="50"
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding RotationAngle}" Width="40"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalContentAlignment="Right"/>
|
||||
<TextBlock Grid.Column="1" Margin="2,0,0,0"
|
||||
HorizontalContentAlignment="Left"/>
|
||||
<TextBlock Grid.Column="1" Margin="2,0,0,0"
|
||||
FontSize="20" Text="°"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Button Grid.Column="0" Grid.Row="6"
|
||||
<Button Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding CClockwiseRotCommand}">
|
||||
<Image Source="/Resources/NestingTab/CounterClockwiseRotate.png"
|
||||
<Image Source="/Resources/NestingTab/CounterClockwiseRotate.png"
|
||||
Width="64" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<ToggleButton Grid.Column="2" Grid.Row="6"
|
||||
</Button>
|
||||
<ToggleButton Grid.Column="2" Grid.Row="6"
|
||||
Style="{StaticResource OptionPanel_NestingToggleButton}"
|
||||
IsChecked="{Binding MagneticIsChecked}">
|
||||
<Image Source="/Resources/NestingTab/AlignPieces.png"
|
||||
<Image Source="/Resources/NestingTab/AlignPieces.png"
|
||||
Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</ToggleButton>
|
||||
<Button Grid.Column="4" Grid.Row="6"
|
||||
</ToggleButton>
|
||||
<Button Grid.Column="4" Grid.Row="6"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Command="{Binding ClockwiseRotCommand}">
|
||||
<Image Source="/Resources/NestingTab/ClockwiseRotate.png"
|
||||
<Image Source="/Resources/NestingTab/ClockwiseRotate.png"
|
||||
Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
<UniformGrid Grid.Column="0" Columns="2" Margin="0,0,0,5">
|
||||
<Button Content="{Binding InsertPartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding InsertPartCommand}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Content="{Binding StorePartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding StorePartCommand}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</UniformGrid>
|
||||
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
|
||||
<Expander Name="myExpander1" Background="Transparent"
|
||||
Foreground="{DynamicResource Omag_White}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="{Binding ManagePartsMsg}"
|
||||
ExpandDirection="Down" IsExpanded="{Binding bManageParts_IsExpanded}">
|
||||
|
||||
<Grid Margin="0,0,-2.5,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="{Binding RemovePartMsg}"
|
||||
Grid.ColumnSpan="{Binding DragRettangle_Cl_Span}"
|
||||
<UniformGrid Grid.Column="0" Columns="3" Margin="0,2.5,0,0">
|
||||
<!--<Button Content="{Binding InsertPartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding RemovePartCommand}"
|
||||
Command="{Binding InsertPartCommand}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<ToggleButton Content="{Binding DragRettangleMsg}" Grid.Column="1"
|
||||
Visibility="{Binding DragRettangle_Visibility}"
|
||||
|
||||
<Button Content="{Binding StorePartMsg}" Grid.Column="1"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding StorePartCommand}"
|
||||
Margin="2.5,0,0,0"/>-->
|
||||
<StackPanel>
|
||||
<Button ToolTip="{Binding InsertPartMsg}" Grid.Column="1"
|
||||
Style="{StaticResource Nest_Button_Img}"
|
||||
Command="{Binding InsertPartCommand}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Inserisci-pezzo.png"
|
||||
Width="40" Height="40" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<!--<TextBlock Text="{Binding InsertPartMsg}"
|
||||
HorizontalAlignment="Center"/>-->
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
<Button ToolTip="{Binding StorePartMsg}" Grid.Column="1"
|
||||
Style="{StaticResource Nest_Button_Img}"
|
||||
Command="{Binding StorePartCommand}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Parcheggia-pezzo.png"
|
||||
Width="40" Height="40" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<!--<TextBlock Text="{Binding StorePartMsg}"
|
||||
HorizontalAlignment="Center"/>-->
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
<Button ToolTip="{Binding RemovePartMsg}" Grid.Column="1"
|
||||
Style="{StaticResource Nest_Button_Img}"
|
||||
Command="{Binding RemovePartCommand}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Elimina-pezzo.png"
|
||||
Width="40" Height="40" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<!--<TextBlock Text="{Binding RemovePartMsg}"
|
||||
HorizontalAlignment="Center"/>-->
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<!--<ToggleButton Content="{Binding StartCurvWJMsg}" Grid.Column="2"
|
||||
Visibility="{Binding StartCurvWJ_Visibility}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bDragRettangle}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
</Grid>
|
||||
IsChecked="{Binding bStartCurvWJ}"
|
||||
Margin="2.5,0,2.5,0"/>-->
|
||||
</UniformGrid>
|
||||
</Expander>
|
||||
</Border>
|
||||
|
||||
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<Button Content="{Binding SelectAllMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding SelectAllCommand}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Content="{Binding DeselectAllMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding DeselectAllCommand}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</UniformGrid>
|
||||
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
|
||||
<Expander Name="myExpander2" Background="Transparent"
|
||||
Foreground="{DynamicResource Omag_White}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="{Binding SelectionPartMsg}"
|
||||
ExpandDirection="Down" IsExpanded="{Binding bSelectionParts_IsExpanded}">
|
||||
|
||||
<Button Content="{Binding ResetMsg}"
|
||||
<UniformGrid Grid.Column="0" Columns="{Binding CountColumn}" Margin="0,2.5,0,0">
|
||||
|
||||
<StackPanel>
|
||||
<Button ToolTip="{Binding SelectAllMsg}" Grid.Column="1"
|
||||
Style="{StaticResource Nest_Button_Img}"
|
||||
Command="{Binding SelectAllCommand}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Margin="2.5,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Seleziona-tutto.png"
|
||||
Width="40" Height="40" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<!--<TextBlock Text="{Binding SelectAllMsg}"
|
||||
HorizontalAlignment="Center"/>-->
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
<Button ToolTip="{Binding DeselectAllMsg}" Grid.Column="1"
|
||||
Style="{StaticResource Nest_Button_Img}"
|
||||
Command="{Binding DeselectAllCommand}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Margin="2.5,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Deseleziona-tutto.png"
|
||||
Width="40" Height="40" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<!--<TextBlock Text="{Binding DeselectAllMsg}"
|
||||
HorizontalAlignment="Center"/>-->
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
<ToggleButton ToolTip="{Binding DragRectangleMsg}" Grid.Column="1"
|
||||
Visibility="{Binding DragRectangle_Visibility}"
|
||||
Style="{StaticResource Nest_ToggleButton_Img}"
|
||||
IsChecked="{Binding bDragRectangle}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Margin="2.5,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Drag_Rettangle.png"
|
||||
Width="40" Height="40" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<!--<TextBlock Text="{Binding DragRectangleMsg}"
|
||||
HorizontalAlignment="Center"/>-->
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
|
||||
</UniformGrid>
|
||||
</Expander>
|
||||
</Border>
|
||||
|
||||
<Border Style="{StaticResource Border}" Margin="0,1,0,5" Visibility="{Binding WJ_Cmd_Visibility}">
|
||||
<Expander Name="myExpander3" Background="Transparent"
|
||||
Foreground="{DynamicResource Omag_White}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Header="{Binding ManageWJMsg}"
|
||||
ExpandDirection="Down" IsExpanded="{Binding bManageWJ_IsExpanded}">
|
||||
<UniformGrid Grid.Column="0" Columns="2" Margin="2.5,0,0,0" Visibility="{Binding WJ_Cmd_Visibility}">
|
||||
<StackPanel HorizontalAlignment="Right" Margin="0,0,3.75,0">
|
||||
<ToggleButton ToolTip="{Binding SplitCurvWJMsg}" Grid.Column="1"
|
||||
Style="{StaticResource Nest_ToggleButton_Img}"
|
||||
IsChecked="{Binding bSplitCurvWJ}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/SPLIT-WJ.png"
|
||||
Width="40" Height="40" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<!--<TextBlock Text="{Binding SplitCurvWJMsg}"
|
||||
HorizontalAlignment="Center"/>-->
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel HorizontalAlignment="Left" Margin="3.75,0,0,0">
|
||||
<ToggleButton ToolTip="{Binding StartCurvWJMsg}" Grid.Column="1"
|
||||
Style="{StaticResource Nest_ToggleButton_Img}"
|
||||
IsChecked="{Binding bStartCurvWJ}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/START-WJ.png"
|
||||
Width="40" Height="40" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
<!--<TextBlock Text="{Binding StartCurvWJMsg}"
|
||||
HorizontalAlignment="Center"/>-->
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
|
||||
</UniformGrid>
|
||||
</Expander>
|
||||
</Border>
|
||||
|
||||
|
||||
<Button Content="{Binding ResetMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding ResetCommand}"
|
||||
Margin="0,0,0,5"/>
|
||||
Margin="0,5,0,5"/>
|
||||
|
||||
<Button Content="{Binding CsvDataMsg}"
|
||||
<Button Content="{Binding CsvDataMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding CsvDataCommand}"
|
||||
Visibility="{Binding CsvData_Visibility}"
|
||||
Margin="0,0,0,5"/>
|
||||
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -1,39 +1,78 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
|
||||
<UserControl x:Class="OptionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
|
||||
Width="268"
|
||||
IsTopDockable="False" IsBottomDockable="False" IsLeftDockable="True"
|
||||
IsRightDockable="False" Style="{StaticResource Option_EgtFloatingPanel}">
|
||||
Width="190">
|
||||
|
||||
<TabControl Name="Tabs" SelectedIndex="{Binding SelItem}">
|
||||
<TabItem Header="{Binding RawPartTabMsg}" IsEnabled="{Binding RawTabIsEnabled}"
|
||||
Background="{Binding RawPart_Background}">
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:RawPartTabV DataContext="{StaticResource RawPartTabVM}"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding NestingTabMsg}" IsEnabled="{Binding NestTabIsEnabled}">
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:NestingTabV DataContext="{StaticResource NestingTabVM}"/>
|
||||
</TabItem.Content>
|
||||
<TabItem.Style>
|
||||
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
|
||||
<EventSetter Event="PreviewMouseDown" Handler="NestingTab_Click"/>
|
||||
</Style>
|
||||
</TabItem.Style>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding MachiningTabMsg}" IsEnabled="{Binding MachTabIsEnabled}">
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:MachiningTabV DataContext="{StaticResource MachiningTabVM}"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding SimulTabMsg}" IsEnabled="{Binding SimulTabIsEnabled}">
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:SimulTabV DataContext="{StaticResource SimulTabVM}"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl Name="Tabs" SelectedIndex="{Binding SelItem}" Background="Transparent"
|
||||
Padding="0,0,0,0"
|
||||
Margin="5,0.5,5,0"
|
||||
Style="{StaticResource TabControlOptinPanel}">
|
||||
<TabItem IsEnabled="{Binding RawTabIsEnabled}"
|
||||
Margin="0,0,0,0"
|
||||
Style="{StaticResource TabItemOptinPanel}">
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal" Width="35" Height="35">
|
||||
<Image Source="/Resources/NewIcons/icone-tagli-5.png"
|
||||
Stretch="UniformToFill"
|
||||
ToolTip="{Binding RawPartTabMsg}"/>
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:RawPartTabV DataContext="{StaticResource RawPartTabVM}"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem IsEnabled="{Binding NestTabIsEnabled}"
|
||||
Margin="0,0,0,0"
|
||||
Style="{StaticResource TabItemOptinPanel}">
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal" Width="35" Height="35">
|
||||
<Image ToolTip="{Binding NestingTabMsg}" Source="/Resources/NewIcons/Nest.png" Stretch="Uniform" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:NestingTabV DataContext="{StaticResource NestingTabVM}"/>
|
||||
</TabItem.Content>
|
||||
<!--<TabItem.Style>
|
||||
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource TabItemOptinPanel}">
|
||||
<EventSetter Event="PreviewMouseDown" Handler="NestingTab_Click"/>
|
||||
</Style>
|
||||
</TabItem.Style>-->
|
||||
</TabItem>
|
||||
<TabItem IsEnabled="{Binding MachTabIsEnabled}"
|
||||
Margin="0,0,0,0"
|
||||
Style="{StaticResource TabItemOptinPanel}">
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal" Width="35" Height="35">
|
||||
<Image ToolTip="{Binding MachiningTabMsg}" Source="/Resources/NewIcons/Split.png" Stretch="Uniform" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:MachiningTabV DataContext="{StaticResource MachiningTabVM}"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem IsEnabled="{Binding SimulTabIsEnabled}"
|
||||
Margin="0,0,0,0"
|
||||
Style="{StaticResource TabItemOptinPanel}">
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal" Width="35" Height="35">
|
||||
<Image ToolTip="{Binding SimulTabMsg}" Source="/Resources/NewIcons/Simula.png" Stretch="Uniform" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:SimulTabV DataContext="{StaticResource SimulTabVM}"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<!--Se click + Key Shift sopra Label apertura dellì file Log-->
|
||||
<Label Grid.Row="1"
|
||||
Background="Transparent"
|
||||
MouseLeftButtonDown="Label_MouseLeftButtonDown"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
Public Class OptionPanelV
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class OptionPanelV
|
||||
|
||||
Private m_OptionPanelVM As OptionPanelVM
|
||||
|
||||
@@ -24,6 +27,35 @@
|
||||
If Not OmagOFFICEMap.refOptionPanelVM.NestTabIsEnabled Then e.Handled = True
|
||||
End Sub
|
||||
|
||||
Private Sub Label_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs)
|
||||
If Not (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then Return
|
||||
Dim sTmpDir As String = String.Empty
|
||||
If Not EgtInterface.EgtGetTempDir(sTmpDir) Then Return
|
||||
' Genero file CNC (lancio anche se errore in precedenza)
|
||||
Dim sLog1 As String = sTmpDir & "\OmagOFFICELog1.txt"
|
||||
Dim sLog2 As String = sTmpDir & "\OmagOFFICELog2.txt"
|
||||
Dim sLog As String = ""
|
||||
|
||||
If File.Exists(sLog1) AndAlso File.Exists(sLog2) Then
|
||||
If File.GetLastAccessTimeUtc(sLog1) > File.GetLastAccessTimeUtc(sLog2) Then
|
||||
sLog = sLog1
|
||||
Else
|
||||
sLog = sLog2
|
||||
End If
|
||||
ElseIf File.Exists(sLog1) AndAlso Not File.Exists(sLog2) Then
|
||||
sLog = sLog1
|
||||
ElseIf File.Exists(sLog2) AndAlso Not File.Exists(sLog1) Then
|
||||
sLog = sLog2
|
||||
End If
|
||||
|
||||
Try
|
||||
Process.Start("Notepad.exe", sLog)
|
||||
Catch ex As Exception
|
||||
ex.ToString()
|
||||
End Try
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -5,16 +5,15 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtPHOTOLib="clr-namespace:EgtPHOTOLib;assembly=EgtPHOTOLib"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300"
|
||||
Title="OmagPHOTO"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False">
|
||||
<EgtPHOTOLib:ProjectSlabV DataContext="{StaticResource ProjectSlabVM}"/>
|
||||
<!--<DockPanel>
|
||||
<Grid>
|
||||
<ContentControl Content="{Binding OmagPhotoContent}"/>
|
||||
|
||||
</Grid>
|
||||
</DockPanel>-->
|
||||
<DockPanel>
|
||||
|
||||
<!--Progetto corrente-->
|
||||
<EgtPHOTOLib:ProjectSlabV DataContext="{StaticResource ProjectSlabVM}"/>
|
||||
|
||||
</DockPanel>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
|
||||
'Private m_OmagPhotoVM As OmagPhotoVM
|
||||
|
||||
'Sub New(Owner As Window, OmagPhotoVM As OmagPhotoVM)
|
||||
'Public Sub New(Owner As Window)
|
||||
' MyBase.New(Owner)
|
||||
' ' This call is required by the designer.
|
||||
' 'This call Is required by the designer.
|
||||
' InitializeComponent()
|
||||
' Me.DataContext = OmagPhotoVM
|
||||
' ' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
' m_OmagPhotoVM = OmagPhotoVM
|
||||
|
||||
'End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -5,176 +5,217 @@
|
||||
xmlns:EgtPHOTOLib="clr-namespace:EgtPHOTOLib;assembly=EgtPHOTOLib"
|
||||
Margin="5,5,5,0">
|
||||
|
||||
<Border Style="{StaticResource DefaultBorder}"
|
||||
Padding="5,5,5,0">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Style="{StaticResource OptionPanel_Button}"
|
||||
Grid.Column="0"
|
||||
<StackPanel>
|
||||
<GroupBox Header="Photo" Style="{StaticResource GroupBoxRow}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Margin="0,2.5,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Style="{StaticResource OptionPanelRaw_Button}"
|
||||
Grid.Column="0" Grid.Row="0"
|
||||
Visibility="{Binding SlabIdVisibility}"
|
||||
IsEnabled="{Binding SlabIdIsEnabled}"
|
||||
Command="{Binding SlabIdCommand}"
|
||||
Width="30" Height="30"
|
||||
Margin="0,0,0,5" >
|
||||
<Image Source="/Resources/RawPartTab/SlabId.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Style="{StaticResource OptionPanel_Button}"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,0,0" >
|
||||
<Image Source="/Resources/RawPartTab/SlabId.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Style="{StaticResource OptionPanelRaw_Button}"
|
||||
Grid.Column="2" Grid.Row="0"
|
||||
Command="{Binding PhotoCommand}"
|
||||
Margin="0,0,0,5" >
|
||||
<Image Source="/Resources/RawPartTab/Photo.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<ToggleButton Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
Grid.Column="2"
|
||||
ToolTip="{Binding PhotoToolTip }"
|
||||
Margin="0,0,0,0" >
|
||||
<Image Source="/Resources/RawPartTab/Photo.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<ToggleButton Style="{StaticResource OptionPanelRaw_ToggleButton}"
|
||||
Grid.Column="4" Grid.Row="0"
|
||||
IsChecked="{Binding PhotoWithMouse}"
|
||||
Width="30"
|
||||
Margin="0,0,0,5" >
|
||||
<Image Source="/Resources/RawPartTab/Mouse.png" Stretch="Uniform"/>
|
||||
</ToggleButton>
|
||||
</Grid>
|
||||
ToolTip="{Binding MovePhotoToolTip }"
|
||||
Margin="0,0,0,0" >
|
||||
<Image Source="/Resources/RawPartTab/MovePhoto.png" Stretch="Uniform" Width="40"/>
|
||||
</ToggleButton>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<UniformGrid Columns="2" Rows="3" Margin="0,0,0,0">
|
||||
<GroupBox Header="Offset photo" Style="{StaticResource GroupBoxRow}">
|
||||
<UniformGrid Columns="2" Rows="3" Margin="0,0,0,0">
|
||||
|
||||
<TextBlock Text="{Binding OffsetXMsg}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding PhotoOffsetX}"
|
||||
Margin="13,0,0,5"
|
||||
<TextBlock Text="{Binding OffsetXMsg}" Style="{StaticResource RawTextBlock}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding PhotoOffsetX}"
|
||||
BorderThickness="0"
|
||||
Margin="0,0,0,5"
|
||||
TextAlignment="Right"/>
|
||||
<TextBlock Text="{Binding OffsetYMsg}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding PhotoOffsetY}"
|
||||
Margin="13,0,0,5"
|
||||
<TextBlock Text="{Binding OffsetYMsg}" Style="{StaticResource RawTextBlock}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding PhotoOffsetY}"
|
||||
Margin="0,0,0,5"
|
||||
TextAlignment="Right"/>
|
||||
<TextBlock Text="{Binding PhotoRotMsg}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding PhotoRot}"
|
||||
Margin="13,0,0,5"
|
||||
<TextBlock Text="{Binding PhotoRotMsg}" Style="{StaticResource RawTextBlock}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding PhotoRot}"
|
||||
Margin="0,0,0,5"
|
||||
TextAlignment="Right"/>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Definizione della Grid per il materiale -->
|
||||
<GroupBox Header="{Binding MaterialMsg}" Margin="0,0,0,5">
|
||||
<!-- Definizione della Grid per il materiale -->
|
||||
<GroupBox Header="{Binding MaterialMsg}" Style="{StaticResource GroupBoxRow}">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ComboBox ItemsSource="{Binding MaterialList}"
|
||||
DisplayMemberPath="sName"
|
||||
SelectedItem="{Binding SelMaterial}"/>
|
||||
<TextBlock Grid.Row="1" Text="{Binding MaterialFromDB}"
|
||||
<ComboBox ItemsSource="{Binding MaterialList}"
|
||||
Style="{DynamicResource Raw_ComboBox}"
|
||||
DisplayMemberPath="sName"
|
||||
SelectedItem="{Binding SelMaterial}">
|
||||
<ComboBox.ItemContainerStyle>
|
||||
<Style TargetType="ComboBoxItem">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="150" />
|
||||
</Style>
|
||||
</ComboBox.ItemContainerStyle>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Grid.Row="1" Text="{Binding MaterialFromDB}"
|
||||
Style="{StaticResource RawTextBlock}"
|
||||
Visibility="{Binding VisibilityMaterialFromDB}"
|
||||
Margin="0,5,0,0"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<UniformGrid Columns="2" Margin="0,0,0,0">
|
||||
|
||||
<TextBlock Text="{Binding HeightMsg}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Height}"
|
||||
Margin="13,0,0,5"
|
||||
IsEnabled="{Binding HeightIsEnabled}" TextAlignment="Right"/>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<Button Content="{Binding CurrMachMsg}"
|
||||
<Button Content="{Binding CurrMachMsg}"
|
||||
Command="{Binding CurrMachCommand}"
|
||||
Background="{Binding CurrMach_Background}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Margin="0,0,0,5"/>
|
||||
Margin="0,5,0,0"/>
|
||||
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<GroupBox Header="Definizion grezzo" Style="{StaticResource GroupBoxRow}">
|
||||
<StackPanel>
|
||||
|
||||
<RadioButton Content="{Binding OutlineMsg}"
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
|
||||
<RadioButton Content="{Binding OutlineMsg}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding OutlineIsChecked}"
|
||||
Margin="0,0,2.5,0">
|
||||
</RadioButton>
|
||||
<RadioButton Content="{Binding DamagedAreaMsg}"
|
||||
Margin="0,0,1,0">
|
||||
</RadioButton>
|
||||
<RadioButton Content="{Binding DamagedAreaMsg}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding DAIsChecked}"
|
||||
Margin="2.5,0,0,0">
|
||||
</RadioButton>
|
||||
Margin="1,0,0,0">
|
||||
</RadioButton>
|
||||
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
<ComboBox ItemsSource="{Binding TypeList}"
|
||||
<ComboBox ItemsSource="{Binding TypeList}"
|
||||
SelectedIndex="{Binding SelType}"
|
||||
Style="{StaticResource Raw_ComboBox}"
|
||||
Margin="0,0,0,5"
|
||||
IsEnabled="{Binding TypeIsEnabled}"/>
|
||||
IsEnabled="{Binding TypeIsEnabled}">
|
||||
<ComboBox.ItemContainerStyle>
|
||||
<Style TargetType="ComboBoxItem">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
|
||||
<!-- Definizione della Grid per definizione grezzo -->
|
||||
<UniformGrid Columns="2" Rows="5" Margin="0,0,0,0">
|
||||
</Style>
|
||||
</ComboBox.ItemContainerStyle>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Text="{Binding LengthMsg}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Length}"
|
||||
Margin="13,0,0,5"
|
||||
<!-- Definizione della Grid per definizione grezzo -->
|
||||
<UniformGrid Columns="2" Rows="6" Margin="0,0,0,0">
|
||||
|
||||
<TextBlock Text="{Binding LengthMsg}" Style="{StaticResource RawTextBlock}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Length}"
|
||||
Margin="0,0,0,5"
|
||||
IsEnabled="{Binding LengthIsEnabled}" TextAlignment="Right"/>
|
||||
<TextBlock Text="{Binding WidthMsg}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Width}"
|
||||
Margin="13,0,0,5"
|
||||
<TextBlock Text="{Binding WidthMsg}" Style="{StaticResource RawTextBlock}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Width}"
|
||||
Margin="0,0,0,5"
|
||||
IsEnabled="{Binding WidthIsEnabled}" TextAlignment="Right"/>
|
||||
<TextBlock Text="{Binding OffsetXMsg}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding OffsetX}"
|
||||
Margin="13,0,0,5"
|
||||
<TextBlock Text="{Binding HeightMsg}" Style="{StaticResource RawTextBlock}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Height}"
|
||||
Margin="0,0,0,5"
|
||||
IsEnabled="{Binding HeightIsEnabled}" TextAlignment="Right"/>
|
||||
<TextBlock Text="{Binding OffsetXMsg}" Style="{StaticResource RawTextBlock}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding OffsetX}"
|
||||
Margin="0,0,0,5"
|
||||
IsEnabled="{Binding OffsetXIsEnabled}" TextAlignment="Right"/>
|
||||
<TextBlock Text="{Binding OffsetYMsg}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding OffsetY}"
|
||||
Margin="13,0,0,5"
|
||||
<TextBlock Text="{Binding OffsetYMsg}" Style="{StaticResource RawTextBlock}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding OffsetY}"
|
||||
Margin="0,0,0,5"
|
||||
IsEnabled="{Binding OffsetYIsEnabled}" TextAlignment="Right"/>
|
||||
<TextBlock Text="{Binding KerfMsg}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Kerf, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="13,0,0,5"
|
||||
<TextBlock Text="{Binding KerfMsg}" Style="{StaticResource RawTextBlock}"/>
|
||||
<EgtWpfLib5:EgtTextBox Text="{Binding Kerf, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="0,0,0,5"
|
||||
IsEnabled="{Binding KerfIsEnabled}" TextAlignment="Right"/>
|
||||
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
<!-- Definizione della Grid per Punti -->
|
||||
<GroupBox Header="{Binding PointsMsg}" Margin="0,0,0,5"
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<!-- Definizione della Grid per Punti -->
|
||||
<GroupBox Header="{Binding PointsMsg}" Style="{StaticResource GroupBoxRow}"
|
||||
Visibility="{Binding PointsVisibility}">
|
||||
|
||||
<StackPanel>
|
||||
<StackPanel>
|
||||
|
||||
<UniformGrid Columns="2">
|
||||
<UniformGrid Columns="2">
|
||||
|
||||
<ToggleButton Content="{Binding AddMsg}"
|
||||
<ToggleButton Content="{Binding AddMsg}"
|
||||
IsChecked="{Binding AddPoint}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
||||
<ToggleButton Content="{Binding RemoveMsg}" Grid.Column="1"
|
||||
<ToggleButton Content="{Binding RemoveMsg}" Grid.Column="1"
|
||||
IsChecked="{Binding RemovePoint}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!-- Definizione della Grid per Zona rovinata -->
|
||||
<GroupBox Header="{Binding DamagedAreaMsg}" Margin="0,0,0,5"
|
||||
<!-- Definizione della Grid per Zona rovinata -->
|
||||
<GroupBox Header="{Binding DamagedAreaMsg}" Style="{StaticResource GroupBoxRow}"
|
||||
Visibility="{Binding DAVisibility}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Content="{Binding NewMsg}"
|
||||
<ToggleButton Content="{Binding NewMsg}"
|
||||
IsChecked="{Binding NewDA}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
||||
<ToggleButton Content="{Binding DeleteMsg}" Grid.Column="1"
|
||||
<ToggleButton Content="{Binding DeleteMsg}" Grid.Column="1"
|
||||
IsChecked="{Binding DeleteDA}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!-- Definizione della Grid per Punti Per il Registration -->
|
||||
<GroupBox Header="{Binding PointsRegMsg}" Style="{StaticResource GroupBoxRow}"
|
||||
Visibility="{Binding PointsRegVisibility}">
|
||||
<StackPanel>
|
||||
<UniformGrid Columns="3">
|
||||
<ToggleButton Content="{Binding AddMsg}"
|
||||
IsChecked="{Binding AddPointReg}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
||||
<ToggleButton Content="{Binding ModMsg}"
|
||||
IsChecked="{Binding ModPointReg}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
||||
<ToggleButton Content="{Binding RemoveMsg}"
|
||||
IsChecked="{Binding RemovePointReg}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"/>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<Button Content="{Binding ConfirmPhotoMsg}"
|
||||
Command="{Binding ConfirmPhotoCommand}"
|
||||
@@ -183,5 +224,5 @@
|
||||
Margin="0,0,0,5"/>
|
||||
|
||||
<!--<EgtPHOTOLib:ProjectSlabV DataContext="{StaticResource ProjectSlabVM}"/>-->
|
||||
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
Public Class RawPartTabV
|
||||
Private Sub ComboBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports System.IO
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Threading
|
||||
Imports System.IO
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtPHOTOLib
|
||||
@@ -7,6 +9,10 @@ Imports EgtUILib
|
||||
Public Class RawPartTabVM
|
||||
Inherits VMBase
|
||||
|
||||
' Timer
|
||||
Private m_TimerIsBusy As Boolean = False
|
||||
Private m_RefreshTimer As New DispatcherTimer
|
||||
|
||||
Friend OmagPhoto As OmagPhotoV
|
||||
|
||||
Private m_OmagPhotoVM As OmagPhotoVM
|
||||
@@ -36,6 +42,17 @@ Public Class RawPartTabVM
|
||||
' Layer per crocette temporanee
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
|
||||
' Layer per crocette dei punti REG
|
||||
Friend m_nRegGroupId As Integer = GDB_ID.NULL
|
||||
' Numero di spot inseriti nel grezzo corrente
|
||||
Private m_nCountSpot As Integer = 0
|
||||
' Gruppo Spot attualmente selezionato
|
||||
Private m_nCurrSpotRegId As Integer = GDB_ID.NULL
|
||||
Private Const COUNTSPOT As String = "CountSpot"
|
||||
Private Const REG As String = "Reg"
|
||||
Private Const SPOTREG_ As String = "SpotReg_"
|
||||
Private Const RADSPOT As Double = 20
|
||||
|
||||
' Costante minima dimensione del grezzo
|
||||
Private Const MIN_RAW_DIM As Double = 10
|
||||
' Costante distanza di sicurezza del grezzo dal bordo
|
||||
@@ -337,9 +354,11 @@ Public Class RawPartTabVM
|
||||
Dim dHeight As Double = 0
|
||||
If StringToLen(value, dHeight) And dHeight > -EPS_ZERO Then
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
Dim dPrevHeight As Double = m_dHeight
|
||||
m_dHeight = dHeight
|
||||
UpdateRawPartHeight()
|
||||
UpdateTabState()
|
||||
MoveAllSpotRegistration(New Vector3d(0, 0, m_dHeight - dPrevHeight))
|
||||
EstCalc.SetSlabHeight(dHeight)
|
||||
OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.NotifyPropertyChanged("MachGroupToolTip")
|
||||
Else
|
||||
@@ -735,6 +754,73 @@ Public Class RawPartTabVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'-------------------- REGISTRATION '--------------------
|
||||
Private m_AddPointReg As Boolean
|
||||
Public Property AddPointReg As Boolean
|
||||
Get
|
||||
Return m_AddPointReg
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_AddPointReg Then
|
||||
If value Then
|
||||
PhotoWithMouse = False
|
||||
m_bDrag = False
|
||||
End If
|
||||
m_AddPointReg = value
|
||||
NotifyPropertyChanged("AddPointReg")
|
||||
m_ModPointReg = False
|
||||
NotifyPropertyChanged("ModPointReg")
|
||||
m_RemovePointReg = False
|
||||
NotifyPropertyChanged("RemovePointReg")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ModPointReg As Boolean
|
||||
Public Property ModPointReg As Boolean
|
||||
Get
|
||||
Return m_ModPointReg
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_ModPointReg Then
|
||||
EgtDeselectAll()
|
||||
EgtResetMark(m_nCurrSpotRegId)
|
||||
EgtDraw()
|
||||
If value Then
|
||||
PhotoWithMouse = False
|
||||
End If
|
||||
m_ModPointReg = value
|
||||
NotifyPropertyChanged("ModPointReg")
|
||||
m_AddPointReg = False
|
||||
NotifyPropertyChanged("AddPointReg")
|
||||
m_RemovePointReg = False
|
||||
NotifyPropertyChanged("RemovePointReg")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_RemovePointReg As Boolean
|
||||
Public Property RemovePointReg As Boolean
|
||||
Get
|
||||
Return m_RemovePointReg
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_RemovePointReg Then
|
||||
If value Then
|
||||
PhotoWithMouse = False
|
||||
m_bDrag = False
|
||||
End If
|
||||
m_RemovePointReg = value
|
||||
NotifyPropertyChanged("RemovePointReg")
|
||||
m_AddPointReg = False
|
||||
NotifyPropertyChanged("AddPointReg")
|
||||
m_ModPointReg = False
|
||||
NotifyPropertyChanged("ModPointReg")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
'-------------------- REGISTRATION '--------------------
|
||||
|
||||
Private m_PointsVisibility As Visibility
|
||||
Public Property PointsVisibility As Visibility
|
||||
Get
|
||||
@@ -818,7 +904,7 @@ Public Class RawPartTabVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CurrMach_Background As Brush = DirectCast(New BrushConverter().ConvertFrom("#FFDDDDDD"), SolidColorBrush)
|
||||
Private m_CurrMach_Background As Brush = DirectCast(New BrushConverter().ConvertFrom("#1C1D22"), SolidColorBrush)
|
||||
Public Property CurrMach_Background As Brush
|
||||
Get
|
||||
Return m_CurrMach_Background
|
||||
@@ -937,6 +1023,12 @@ Public Class RawPartTabVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ModMsg As String
|
||||
Get
|
||||
Return EgtMsg(91668)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property NewMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_RAWPARTPAGEUC + 11)
|
||||
@@ -961,6 +1053,12 @@ Public Class RawPartTabVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PointsRegMsg As String
|
||||
Get
|
||||
Return EgtMsg(91669)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "ToolTip"
|
||||
@@ -971,6 +1069,12 @@ Public Class RawPartTabVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MovePhotoToolTip As String
|
||||
Get
|
||||
Return EgtMsg(MSG_RAWPARTTAB + 3)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
' Definizione comandi
|
||||
@@ -987,9 +1091,12 @@ Public Class RawPartTabVM
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefRawPartTabVM(Me)
|
||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
||||
'Me.OmagPhoto = New OmagPhotoV(Application.Current.MainWindow(), New OmagPhotoVM)
|
||||
' Me.OmagPhoto = New OmagPhotoV(Application.Current.MainWindow())
|
||||
Me.OmagPhoto = New OmagPhotoV
|
||||
If Not PhotoMap.ContinueApplication Then End
|
||||
If Not PhotoMap.ContinueApplication Then
|
||||
EgtOutLog("Key protection denied to acces to DB photo, set configuration to image directory")
|
||||
End
|
||||
End If
|
||||
End If
|
||||
' Aggiungo voci alla lista di tipi di definizione grezzo
|
||||
m_TypeList.Add(EgtMsg(MSG_RAWPARTPAGEUC + 1))
|
||||
@@ -1003,8 +1110,8 @@ Public Class RawPartTabVM
|
||||
Friend Function InitRawPart() As Boolean
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
' Se abilitati, visualizzo bottone per dati lastra
|
||||
Dim bSlabId As Boolean = ( GetMainPrivateProfileInt( S_RAWPART, K_SLABID, 0) <> 0)
|
||||
SlabIdVisibility = If( bSlabId, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
Dim bSlabId As Boolean = (GetMainPrivateProfileInt(S_RAWPART, K_SLABID, 0) <> 0)
|
||||
SlabIdVisibility = If(bSlabId, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
' Se disponibile, imposto possibilità di contorno da foto
|
||||
If EstPhoto.GetContour() = GDB_ID.NULL Then
|
||||
If m_TypeList.Count = 3 Then m_TypeList.RemoveAt(2)
|
||||
@@ -1086,10 +1193,26 @@ Public Class RawPartTabVM
|
||||
RecalcRawPart(True)
|
||||
End If
|
||||
' Abilitazione eventuale bottone per dati slab
|
||||
SlabIdIsEnabled = ( EstCalc.GetRawId() <> GDB_ID.NULL)
|
||||
SlabIdIsEnabled = (EstCalc.GetRawId() <> GDB_ID.NULL)
|
||||
' Creo layer temporaneo per crocette
|
||||
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||
|
||||
' Veroifico se esiste il gruppo "REG"
|
||||
Dim nIdRaws As Integer = EgtGetParent(EstCalc.GetRawId())
|
||||
Dim nIdReg As Integer = EgtGetFirstNameInGroup(EgtGetParent(nIdRaws), "Reg")
|
||||
If nIdReg <> GDB_ID.NULL Then
|
||||
m_nRegGroupId = nIdReg
|
||||
EgtGetInfo(m_nRegGroupId, COUNTSPOT, m_nCountSpot)
|
||||
' Lo rendo visibile
|
||||
EgtSetStatus(m_nRegGroupId, GDB_ST.ON_)
|
||||
Else
|
||||
' Creo layer per definire i punti di REG
|
||||
m_nRegGroupId = EgtCreateGroup(EgtGetParent(nIdRaws))
|
||||
EgtSetName(m_nRegGroupId, REG)
|
||||
m_nCountSpot = 0
|
||||
End If
|
||||
|
||||
' Determino modalità di definizione
|
||||
OutlineIsChecked = True
|
||||
If EgtExistsInfo(EstCalc.GetRawId(), KEY_RAWBYPOINTS) Then
|
||||
@@ -1139,14 +1262,14 @@ Public Class RawPartTabVM
|
||||
dRawWidth = m_dTableWidth - 2 * dRawKerf
|
||||
End If
|
||||
If dRawOffsX < dRawKerf Then dRawOffsX = dRawKerf
|
||||
If dRawOffsX + dRawLen + dRawKerf > m_dTableLength Then
|
||||
dRawOffsX = Math.Max(dRawKerf, m_dTableLength - dRawLen - dRawKerf)
|
||||
dRawLen = Math.Min(dRawLen, m_dTableLength - dRawOffsX - dRawKerf)
|
||||
If dRawOffsX + dRawLen + 2 * dRawKerf > m_dTableLength Then
|
||||
dRawOffsX = Math.Max(dRawKerf, m_dTableLength - dRawLen - 2 * dRawKerf)
|
||||
dRawLen = Math.Min(dRawLen, m_dTableLength - dRawOffsX - 2 * dRawKerf)
|
||||
End If
|
||||
If dRawOffsY < dRawKerf Then dRawOffsY = dRawKerf
|
||||
If dRawOffsY + dRawWidth + dRawKerf > m_dTableWidth Then
|
||||
dRawOffsY = Math.Max(dRawKerf, m_dTableWidth - dRawWidth - dRawKerf)
|
||||
dRawWidth = Math.Min(dRawWidth, m_dTableWidth - dRawOffsY - dRawKerf)
|
||||
If dRawOffsY + dRawWidth + 2 * dRawKerf > m_dTableWidth Then
|
||||
dRawOffsY = Math.Max(dRawKerf, m_dTableWidth - dRawWidth - 2 * dRawKerf)
|
||||
dRawWidth = Math.Min(dRawWidth, m_dTableWidth - dRawOffsY - 2 * dRawKerf)
|
||||
End If
|
||||
' Assegno i dati
|
||||
SetLength(dRawLen)
|
||||
@@ -1171,6 +1294,8 @@ Public Class RawPartTabVM
|
||||
WriteMainPrivateProfileString(S_RAWPART, K_RAWOFFSX, DoubleToString(m_dOffsetX, 2))
|
||||
WriteMainPrivateProfileString(S_RAWPART, K_RAWOFFSY, DoubleToString(m_dOffsetY, 2))
|
||||
WriteMainPrivateProfileString(S_RAWPART, K_RAWKERF, DoubleToString(m_dKerf, 2))
|
||||
' Nascondo il gruppo dei punti Reg
|
||||
EgtSetStatus(m_nRegGroupId, GDB_ST.OFF)
|
||||
' Se ci sono pezzi nel grezzo
|
||||
If EgtGetFirstPartInRawPart(EstCalc.GetRawId()) <> GDB_ID.NULL Then
|
||||
' Cancello tutte le lavorazioni
|
||||
@@ -1304,7 +1429,7 @@ Public Class RawPartTabVM
|
||||
AdjustRawPartPosition()
|
||||
End If
|
||||
' Abilitazione eventuale bottone per dati slab
|
||||
SlabIdIsEnabled = ( EstCalc.GetRawId() <> GDB_ID.NULL)
|
||||
SlabIdIsEnabled = (EstCalc.GetRawId() <> GDB_ID.NULL)
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
@@ -1368,7 +1493,6 @@ Public Class RawPartTabVM
|
||||
nInvert = -1
|
||||
End If
|
||||
Dim dOffset As Double = (-m_dKerf - m_PrecKerf) * nInvert
|
||||
EgtSaveFile("c:\EgtData\OmagOFFICE\Temp\Error.nge", NGE.TEXT)
|
||||
Dim nCount As Integer = 0
|
||||
Dim bOK As Boolean = EgtOffsetCurve(nKerfId, dOffset, OFF_TYPE.EXTEND)
|
||||
EgtSetColor(nKerfId, m_KerfCol)
|
||||
@@ -1407,7 +1531,7 @@ Public Class RawPartTabVM
|
||||
If EstCalc.GetRawId() = GDB_ID.NULL Then
|
||||
RecalcRawPart(True)
|
||||
Return
|
||||
' se da cancellare
|
||||
' se da cancellare
|
||||
ElseIf m_dHeight < EPS_SMALL Then
|
||||
' Se ci sono pezzi
|
||||
If EgtGetFirstPartInRawPart(EstCalc.GetRawId()) <> GDB_ID.NULL Then
|
||||
@@ -1428,7 +1552,7 @@ Public Class RawPartTabVM
|
||||
End If
|
||||
' Elimino il grezzo
|
||||
EgtRemoveRawPart(EstCalc.GetRawId())
|
||||
' altrimenti da aggiornare
|
||||
' altrimenti da aggiornare
|
||||
Else
|
||||
' Salvo vecchia altezza
|
||||
Dim dOldHeight As Double = EstCalc.GetRawHeight()
|
||||
@@ -1462,7 +1586,7 @@ Public Class RawPartTabVM
|
||||
EstPhoto.UpdateContour()
|
||||
End If
|
||||
' Abilitazione eventuale bottone per dati slab
|
||||
SlabIdIsEnabled = ( EstCalc.GetRawId() <> GDB_ID.NULL)
|
||||
SlabIdIsEnabled = (EstCalc.GetRawId() <> GDB_ID.NULL)
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
@@ -1570,6 +1694,10 @@ Public Class RawPartTabVM
|
||||
' Muovo eventuali cerchietti alle estremità della curva di contorno
|
||||
MoveCircles(vtMove)
|
||||
End If
|
||||
' Muovo eventuali punti SpotReg
|
||||
If m_nRegGroupId <> GDB_ID.NULL Then
|
||||
MoveAllSpotRegistration(vtMove)
|
||||
End If
|
||||
' Incremento opportunamente l'offset della fotografia
|
||||
Dim dPhotoOffsetX As Double = m_dPhotoOffsetX + vtMove.x
|
||||
Dim dPhotoOffsetY As Double = m_dPhotoOffsetY + vtMove.y
|
||||
@@ -1678,8 +1806,11 @@ Public Class RawPartTabVM
|
||||
End Sub
|
||||
|
||||
Private Sub AdjustRawPartOnExit()
|
||||
' Se non c'è il grezzo, esco
|
||||
If EstCalc.GetRawId() = GDB_ID.NULL Then Return
|
||||
' Se non c'è il grezzo, esco dopo aver nascosto eventuale foto
|
||||
If EstCalc.GetRawId() = GDB_ID.NULL Then
|
||||
ShowPhoto(False)
|
||||
Return
|
||||
End If
|
||||
' Disabilito impostazione modificato
|
||||
Dim bOldEnMod = EgtGetEnableModified()
|
||||
If bOldEnMod Then EgtDisableModified()
|
||||
@@ -1822,6 +1953,110 @@ Public Class RawPartTabVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function MoveSpotRegistration(nIdGroup As Integer, vtMove As Vector3d) As Boolean
|
||||
If nIdGroup = GDB_ID.NULL Then Return False
|
||||
' Non ci deve essere movimento in Z
|
||||
vtMove.z = 0
|
||||
' Recupero il cercio di riferimento
|
||||
Dim nArcId As Integer = EgtGetFirstInGroup(nIdGroup)
|
||||
Dim b3Crv As New BBox3d
|
||||
EgtGetBBoxGlob(nArcId, GDB_BB.STANDARD, b3Crv)
|
||||
b3Crv.Move(vtMove)
|
||||
If b3Crv.Min().x < m_ptTableMin.x + 10 * EPS_SMALL Then
|
||||
vtMove.x += m_ptTableMin.x + 10 * EPS_SMALL - b3Crv.Min().x
|
||||
ElseIf b3Crv.Max().x > m_ptTableMin.x + m_dTableLength + 10 * EPS_SMALL Then
|
||||
vtMove.x += m_ptTableMin.x + m_dTableLength - 10 * EPS_SMALL - b3Crv.Max().x
|
||||
End If
|
||||
If b3Crv.Min().y < m_ptTableMin.y + 10 * EPS_SMALL Then
|
||||
vtMove.y += m_ptTableMin.y + 10 * EPS_SMALL - b3Crv.Min().y
|
||||
ElseIf b3Crv.Max().y > m_ptTableMin.y + m_dTableWidth + 10 * EPS_SMALL Then
|
||||
vtMove.y += m_ptTableMin.y + m_dTableWidth - 10 * EPS_SMALL - b3Crv.Max().y
|
||||
End If
|
||||
' muovo il gruppo
|
||||
EgtMove(nIdGroup, vtMove)
|
||||
EgtDraw()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Sub MoveAllSpotRegistration(vtMove As Vector3d, Optional bOnlyOfficeSpot As Boolean = True)
|
||||
Dim nId As Integer = EgtGetFirstInGroup(OmagOFFICEMap.refRawPartTabVM.m_nRegGroupId)
|
||||
While nId <> GDB_ID.NULL
|
||||
Dim sName As String = String.Empty
|
||||
EgtGetName(nId, sName)
|
||||
If Not sName.Contains("CUT") Or Not bOnlyOfficeSpot Then
|
||||
EgtMove(nId, vtMove)
|
||||
End If
|
||||
nId = EgtGetNext(nId)
|
||||
End While
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Function CreateSpotRegistration(nLayerIdReg As Integer, ptP As Point3d, nIndexSpot As Integer) As Boolean
|
||||
' creo uno specifico layer per ogni spot (definito da una croce inscritta in un cerchio)
|
||||
Dim nIdSpotLay As Integer = EgtCreateGroup(nLayerIdReg)
|
||||
' Aggiungo cerchio
|
||||
Dim nCircId As Integer = EgtCreateCircle(nIdSpotLay, ptP, RADSPOT)
|
||||
' Inserisco una croce all'interno del
|
||||
Dim nLineVId As Integer = EgtCreateLinePVL(nIdSpotLay, ptP, Vector3d.Y_AX, RADSPOT)
|
||||
EgtExtendCurveStartByLen(nLineVId, RADSPOT)
|
||||
Dim nLineHId As Integer = EgtCreateLinePVL(nIdSpotLay, ptP, Vector3d.X_AX, RADSPOT)
|
||||
EgtExtendCurveStartByLen(nLineHId, RADSPOT)
|
||||
Dim nTextId As Integer = EgtCreateText(nIdSpotLay, ptP + New Vector3d(1, 1, 0), nIndexSpot.ToString, 10)
|
||||
' coloro gli oggetti appena creati ed assegno il nome
|
||||
Dim bOk As Boolean = EgtSetColor(nCircId, New Color3d(0, 0, 0))
|
||||
bOk = bOk And EgtSetName(nCircId, SPOTREG_ & "Arc")
|
||||
bOk = bOk And EgtSetColor(nLineVId, New Color3d(0, 0, 0))
|
||||
bOk = bOk And EgtSetName(nLineVId, SPOTREG_ & "LineV")
|
||||
bOk = bOk And EgtSetColor(nLineHId, New Color3d(0, 0, 0))
|
||||
bOk = bOk And EgtSetName(nLineHId, SPOTREG_ & "LineH")
|
||||
bOk = bOk And EgtSetColor(nTextId, New Color3d(255, 0, 0))
|
||||
bOk = bOk And EgtSetName(nTextId, SPOTREG_ & "Text")
|
||||
' assegno il nome del gruppo corrente
|
||||
bOk = bOk And EgtSetName(nIdSpotLay, SPOTREG_ & nIndexSpot.ToString)
|
||||
If bOk Then
|
||||
' Aggiorno il contatore degli Spot
|
||||
EgtSetInfo(nLayerIdReg, COUNTSPOT, nIndexSpot)
|
||||
m_nCountSpot = nIndexSpot
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function RemoveSpotRegistration(nSpotRegId As Integer) As Boolean
|
||||
Dim nIndSpotReg As Integer = GetIndexGroupSpotReg(nSpotRegId)
|
||||
If Not EgtErase(nSpotRegId) Then Return False
|
||||
' faccio scorrere tutti i gruppi ed eventualmente li rinomino
|
||||
Dim n_IdSR As Integer = EgtGetFirstInGroup(m_nRegGroupId)
|
||||
m_nCountSpot -= 1
|
||||
EgtSetInfo(m_nRegGroupId, COUNTSPOT, m_nCountSpot)
|
||||
While n_IdSR <> GDB_ID.NULL
|
||||
Dim nCurrIndSpotReg As Integer = GetIndexGroupSpotReg(n_IdSR)
|
||||
If nCurrIndSpotReg > nIndSpotReg Then
|
||||
' Recupero il testo
|
||||
Dim nIdtext As Integer = EgtGetFirstNameInGroup(n_IdSR, SPOTREG_ & "Text")
|
||||
nCurrIndSpotReg -= 1
|
||||
EgtModifyText(nIdtext, nCurrIndSpotReg.ToString)
|
||||
EgtSetName(n_IdSR, SPOTREG_ & nCurrIndSpotReg.ToString)
|
||||
End If
|
||||
n_IdSR = EgtGetNext(n_IdSR)
|
||||
End While
|
||||
EgtDraw()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function GetIndexGroupSpotReg(nSpotRegId As Integer) As Integer
|
||||
Dim sNameParent As String = String.Empty
|
||||
EgtGetName(nSpotRegId, sNameParent)
|
||||
' Ricavo l'indice dal nome
|
||||
Dim sItems As String() = sNameParent.Split("_"c)
|
||||
Dim nCurrIndex As Integer = 0
|
||||
If sItems.Count = 2 Then
|
||||
If Not Integer.TryParse(sItems(1), nCurrIndex) Then
|
||||
nCurrIndex = -1
|
||||
End If
|
||||
End If
|
||||
Return nCurrIndex
|
||||
End Function
|
||||
|
||||
Private Function ValidateCurrMachMatThick() As Boolean
|
||||
' Verifico che le lavorazioni correnti siano compatibili con materiale e spessore
|
||||
' Lama
|
||||
@@ -1872,7 +2107,7 @@ Public Class RawPartTabVM
|
||||
OmagOFFICEMap.refOptionPanelVM.MachTabIsEnabled = True
|
||||
OmagOFFICEMap.refOptionPanelVM.SimulTabIsEnabled = True
|
||||
OmagOFFICEMap.refOptionPanelVM.RawPart_Background = OmagOFFICEDictionary.TabControl_Header_Background
|
||||
CurrMach_Background = DirectCast(New BrushConverter().ConvertFrom("#FFDDDDDD"), SolidColorBrush)
|
||||
CurrMach_Background = DirectCast(New BrushConverter().ConvertFrom("#1C1D22"), SolidColorBrush)
|
||||
Else
|
||||
OmagOFFICEMap.refOptionPanelVM.NestTabIsEnabled = False
|
||||
OmagOFFICEMap.refOptionPanelVM.MachTabIsEnabled = False
|
||||
@@ -1883,7 +2118,7 @@ Public Class RawPartTabVM
|
||||
If Not ValidateCurrMachToolIsInSetUp() Then
|
||||
OmagOFFICEMap.refMachinePanelVM.SetUp_Background = Brushes.Red
|
||||
Else
|
||||
OmagOFFICEMap.refMachinePanelVM.SetUp_Background = DirectCast(New BrushConverter().ConvertFrom("#FFDDDDDD"), SolidColorBrush)
|
||||
OmagOFFICEMap.refMachinePanelVM.SetUp_Background = DirectCast(New BrushConverter().ConvertFrom("#1C1D22"), SolidColorBrush)
|
||||
End If
|
||||
If String.IsNullOrWhiteSpace(CurrentMachine.sCurrSawing) And String.IsNullOrWhiteSpace(CurrentMachine.sCurrWaterJetting) Then
|
||||
CurrMach_Background = Brushes.Red
|
||||
@@ -1936,32 +2171,32 @@ Public Class RawPartTabVM
|
||||
End Property
|
||||
|
||||
Public Sub SlabId(ByVal param As Object)
|
||||
Dim nRawId As Integer = EstCalc.GetRawId()
|
||||
Dim nRawId As Integer = EstCalc.GetRawId()
|
||||
If nRawId = GDB_ID.NULL Then Return
|
||||
' Finestra input dati
|
||||
Dim DlgSlabIdVM As New SlabIdWindowVM()
|
||||
Dim DlgSlabIdV As New SlabIdWindowV(Application.Current.MainWindow, DlgSlabIdVM)
|
||||
' Recupero eventuali vecchi dati della lastra
|
||||
Dim sBlockName As String = "" : Dim sSlabNbr As String = ""
|
||||
EgtGetInfo( nRawId, INFO_RAW_BLOCK, sBlockName)
|
||||
EgtGetInfo( nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||
DlgSlabIdVM.SetData( sBlockName, sSlabNbr)
|
||||
EgtGetInfo(nRawId, INFO_RAW_BLOCK, sBlockName)
|
||||
EgtGetInfo(nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||
DlgSlabIdVM.SetData(sBlockName, sSlabNbr)
|
||||
' Visualizzo finestra richiesta dati
|
||||
If DlgSlabIdV.ShowDialog() Then
|
||||
DlgSlabIdVM.GetData( sBlockName, sSlabNbr)
|
||||
DlgSlabIdVM.GetData(sBlockName, sSlabNbr)
|
||||
' Assegno info
|
||||
EgtSetInfo( nRawId, INFO_RAW_BLOCK, sBlockName)
|
||||
EgtSetInfo( nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||
EgtSetInfo(nRawId, INFO_RAW_BLOCK, sBlockName)
|
||||
EgtSetInfo(nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||
' Aggiorno nome lastra
|
||||
If Not String.IsNullOrWhiteSpace( sBlockName) And Not String.IsNullOrWhiteSpace( sBlockName) Then
|
||||
If Not String.IsNullOrWhiteSpace(sBlockName) And Not String.IsNullOrWhiteSpace(sBlockName) Then
|
||||
Dim sSlabName = sBlockName & "-" & sSlabNbr
|
||||
EstCalc.SetSlabName( sSlabName)
|
||||
EstCalc.SetSlabName(sSlabName)
|
||||
' notifico il MachGroup Corrente
|
||||
OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.NotifyPropertyChanged("MachGroupToolTip")
|
||||
End If
|
||||
' Cancello vecchio BarCode e se definito inserisco nuovo
|
||||
Dim sBarCode As String = sBlockName & " - " & sSlabNbr
|
||||
ShowBarCode( nRawId, sBarCode)
|
||||
ShowBarCode(nRawId, sBarCode)
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End If
|
||||
@@ -2027,14 +2262,26 @@ Public Class RawPartTabVM
|
||||
PhotoMap.refSearchPanelVM.InitSearchPanel()
|
||||
' inizializzo la ricerca a tutti le lastre di tipo "AVAILABLE" (=1)
|
||||
PhotoMap.refSearchPanelVM.State = 1
|
||||
|
||||
' Resetto la data corrente per la prima ricerca
|
||||
PhotoMap.refSearchPanelVM.StartAddedDate = Nothing
|
||||
PhotoMap.refSearchPanelVM.NotifyPropertyChanged("StartAddedDate")
|
||||
PhotoMap.refSearchPanelVM.EndAddedDate = Nothing
|
||||
PhotoMap.refSearchPanelVM.NotifyPropertyChanged("EndAddedDate")
|
||||
|
||||
PhotoMap.refSearchPanelVM.Search()
|
||||
' inserisco in elenco solo i materiali della macchina corrente
|
||||
AddHandler PhotoMap.refOptionPanelVM.SlabIsSelectedOFFICE, AddressOf OmagOFFICEMap.refRawPartTabVM.ClosePhotoWnd
|
||||
|
||||
' Dim OmagPhotoWnd As New OmagPhotoV(Application.Current.MainWindow(), New OmagPhotoVM)
|
||||
'OmagPhotoWnd.ShowDialog()
|
||||
' lancio il timer di aggiornamento dell'interfaccia, per la gestione di due OmagPHOTO che accedono allo stesso SQL
|
||||
AddHandler m_RefreshTimer.Tick, AddressOf RefreshTimer_Tick
|
||||
m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_RefreshTimer.Start()
|
||||
|
||||
' apro la finestra per accedere al DB delle lastre (Devo crea una nuova istanza perchè la chiusura elimina la stessa)
|
||||
Me.OmagPhoto = New OmagPhotoV
|
||||
OmagPhoto.ShowDialog()
|
||||
Me.OmagPhoto.ShowDialog()
|
||||
m_RefreshTimer.Stop()
|
||||
|
||||
EgtSetCurrentContext(EgtPHOTOLib.MainData.PreviousContext)
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
@@ -2071,6 +2318,17 @@ Public Class RawPartTabVM
|
||||
' aggiungo la nuova lastra
|
||||
OmagOFFICEMap.refMachGroupPanelVM.SlabNameListCurr.Add(sSlabNameDB)
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SetAssignedSlab(sSlabNameDB)
|
||||
|
||||
' Provo ad assegnare il nome della macchinata
|
||||
Dim sName As String = LocalSlab.Id
|
||||
EgtGetMachGroupNewName(sName)
|
||||
If sName <> LocalSlab.Id Then
|
||||
EgtOutLog("Nome lastra (Id lastra) già presente nell'elenco delle macchinate correnti!")
|
||||
Else
|
||||
OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.SetName(LocalSlab.Id)
|
||||
EgtChangeMachGroupName(EgtGetCurrMachGroup, LocalSlab.Id)
|
||||
End If
|
||||
|
||||
Else
|
||||
' Apro dialogo per scelta immagine
|
||||
Dim PhotoDlg As New Microsoft.Win32.OpenFileDialog()
|
||||
@@ -2126,7 +2384,7 @@ Public Class RawPartTabVM
|
||||
EstCalc.SetSlabHeight(m_dHeight)
|
||||
' Visualizzo eventuale codice
|
||||
Dim sBarCode As String = sBlockCode & " - " & sSlabCode
|
||||
ShowBarCode( EstCalc.GetRawId(), sBarCode)
|
||||
ShowBarCode(EstCalc.GetRawId(), sBarCode)
|
||||
' notifico il MachGroup Corrente
|
||||
OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.NotifyPropertyChanged("MachGroupToolTip")
|
||||
' Carico contorno
|
||||
@@ -2153,6 +2411,17 @@ Public Class RawPartTabVM
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' per la gestione di due OmagPHOTO che accedono allo stesso SQL
|
||||
Private Sub RefreshTimer_Tick()
|
||||
If Not m_TimerIsBusy And PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.LIST Then
|
||||
m_TimerIsBusy = True
|
||||
m_RefreshTimer.Stop()
|
||||
EgtPHOTOLib.PhotoMap.refListPageVM.RefreshLisPage()
|
||||
m_TimerIsBusy = False
|
||||
m_RefreshTimer.Start()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' PhotoCommand
|
||||
|
||||
#Region "ConfirmPhotoCommand"
|
||||
@@ -2201,6 +2470,52 @@ Public Class RawPartTabVM
|
||||
m_dDragPar = -1
|
||||
Exit While
|
||||
End If
|
||||
' ---------- SELEZIONE SpotReg ----------
|
||||
ElseIf m_AddPointReg Then
|
||||
' Acquisisco punto da disegno
|
||||
EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
Dim ptRawMax As Point3d = GetRawPtMax()
|
||||
m_ptPrev.z = ptRawMax.z + 0.1
|
||||
' Inserisco un nuovo punto registrazione
|
||||
CreateSpotRegistration(m_nRegGroupId, m_ptPrev, m_nCountSpot + 1)
|
||||
EgtDraw()
|
||||
' disattivo il comando di inserimento
|
||||
m_AddPointReg = False
|
||||
NotifyPropertyChanged("AddPointReg")
|
||||
Return
|
||||
ElseIf m_ModPointReg Then
|
||||
If sName.StartsWith(SPOTREG_) Then
|
||||
EgtDeselectAll()
|
||||
EgtResetMark(m_nCurrSpotRegId)
|
||||
' recupero recupero il centro della prima curva
|
||||
Dim nArcId As Integer = EgtGetFirstInGroup(nSelId)
|
||||
Dim nIdParent As Integer = EgtGetParent(nSelId)
|
||||
EgtSelectGroupObjs(nIdParent)
|
||||
EgtSetMark(nIdParent)
|
||||
EgtDraw()
|
||||
' Acquisisco punto da disegno
|
||||
EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
m_bDrag = True
|
||||
m_nDragEnt = nIdParent
|
||||
' Salvo l'Id del punto SpotReg da spostare
|
||||
m_nCurrSpotRegId = nIdParent
|
||||
' esco dal ciclo
|
||||
Return
|
||||
End If
|
||||
ElseIf m_RemovePointReg Then
|
||||
If sName.StartsWith(SPOTREG_) Then
|
||||
' recupero recupero il centro della prima curva
|
||||
Dim nIdParent As Integer = EgtGetParent(nSelId)
|
||||
RemoveSpotRegistration(nIdParent)
|
||||
EgtDraw()
|
||||
EgtErase(nIdParent)
|
||||
m_RemovePointReg = False
|
||||
NotifyPropertyChanged("RemovePointReg")
|
||||
|
||||
' esco dal ciclo
|
||||
Return
|
||||
End If
|
||||
' ---------- SELEZIONE SpotReg ----------
|
||||
ElseIf sName = NAME_RAW_SOLID Then
|
||||
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
m_nDragEnt = -1
|
||||
@@ -2351,6 +2666,8 @@ Public Class RawPartTabVM
|
||||
' Eseguo modifica
|
||||
If m_PhotoWithMouse Then
|
||||
ModifyPhoto(ptCurr)
|
||||
ElseIf m_ModPointReg Then
|
||||
MoveSpotRegistration(m_nDragEnt, ptCurr - m_ptPrev)
|
||||
Else
|
||||
Select Case GetRawMode()
|
||||
Case RAWMODE.RECTANGLE
|
||||
@@ -2363,6 +2680,8 @@ Public Class RawPartTabVM
|
||||
End If
|
||||
' Aggiorno il punto precedente
|
||||
m_ptPrev = ptCurr
|
||||
' Resetto i ponticelli (per ora non sono in grado di muoverli assieme ai pezzi)
|
||||
ResetAllBridges()
|
||||
End Sub
|
||||
|
||||
Private Sub ModifyPhoto(ptCurr As Point3d)
|
||||
|
||||
@@ -3,31 +3,32 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Margin="5,5,5,0">
|
||||
|
||||
<GroupBox Header="{Binding MachViewMsg}" Margin="0,0,0,5">
|
||||
<GroupBox Header="{Binding MachViewMsg}" Style="{StaticResource GroupBoxRow}">
|
||||
<UniformGrid Columns="3">
|
||||
|
||||
<Button Command="{Binding ToolModeCommand}"
|
||||
Style="{StaticResource OptionPanel_NestingButton}">
|
||||
Style="{StaticResource Simul_Button_Img}">
|
||||
<Image Source="/Resources/SimulTab/ToolMode.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding HeadModeCommand}"
|
||||
Style="{StaticResource OptionPanel_NestingButton}">
|
||||
<Button Command="{Binding HeadModeCommand}"
|
||||
Style="{StaticResource Simul_Button_Img}">
|
||||
<Image Source="/Resources/SimulTab/HeadMode.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding MachModeCommand}"
|
||||
Style="{StaticResource OptionPanel_NestingButton}">
|
||||
Style="{StaticResource Simul_Button_Img}">
|
||||
<Image Source="/Resources/SimulTab/MachMode.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox BorderThickness="0">
|
||||
<Border Style="{StaticResource Border}" Margin="0,5,0,0">
|
||||
<StackPanel DataContext="{Binding MySimul}">
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,10,0,5">
|
||||
|
||||
<Button Command="{Binding StepCommand}" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Style="{StaticResource Simul_Button_Img}"
|
||||
ToolTip="{Binding OneStepToolTip}" Margin="0,0,2.5,0">
|
||||
<Image Source="/Resources/SimulTab/PlayStep.png"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
@@ -35,14 +36,14 @@
|
||||
</Button>
|
||||
|
||||
<Button Command="{Binding PlayPauseCommand}" Grid.Column="1" Grid.Row="3"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Style="{StaticResource Simul_Button_Img}"
|
||||
ToolTip="{Binding PlayPauseToolTip}" Margin="2.5,0,2.5,0">
|
||||
<Image Source="{Binding PlayPauseImage}" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Height="50" Width="50"/>
|
||||
</Button>
|
||||
|
||||
<Button Command="{Binding StopCommand}" Grid.Column="2" Grid.Row="3"
|
||||
Style="{StaticResource OptionPanel_NestingButton}"
|
||||
Style="{StaticResource Simul_Button_Img}"
|
||||
ToolTip="{Binding StopHomeToolTip}" Margin="2.5,0,0,0">
|
||||
<Image Source="/Resources/SimulTab/Stop.png"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
@@ -50,35 +51,41 @@
|
||||
</Button>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<TextBlock Text="{Binding StatusMsg}" FontSize="15" TextAlignment="Center" Margin="10,5,10,0"/>
|
||||
|
||||
<TextBlock Text="{Binding StatusMsg}" FontSize="15" TextAlignment="Center" Margin="10,5,10,0"
|
||||
Style="{StaticResource SimulTextBlock}"/>
|
||||
|
||||
<Slider Name="SpeedSlider" Grid.Row="5" Grid.ColumnSpan="3" Height="30"
|
||||
Minimum="1" Maximum="100" TickPlacement="BottomRight" TickFrequency="10"
|
||||
Margin="0,5,0,0" Value="{Binding SliderValue}"/>
|
||||
<Grid Margin="0,0,0,5">
|
||||
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<TextBlock Text="{Binding TName}" Grid.Row="0" FontSize="15" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" TextAlignment="Center" Margin="5,5,5,0" Grid.ColumnSpan="2" />
|
||||
VerticalAlignment="Center" TextAlignment="Center" Margin="5,5,5,0" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource SimulTextBlock}"/>
|
||||
<TextBlock Text="{Binding SValue}" Grid.Row="0" Grid.Column="2" FontSize="15" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" TextAlignment="Right" Margin="0,5,5,5" />
|
||||
VerticalAlignment="Center" TextAlignment="Right" Margin="0,5,5,5"
|
||||
Style="{StaticResource SimulTextBlock}"/>
|
||||
<TextBlock Text="{Binding GCode}" Grid.Row="1" FontSize="15" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" TextAlignment="Center" Margin="5,5,5,0" Grid.ColumnSpan="2" />
|
||||
VerticalAlignment="Center" TextAlignment="Center" Margin="5,5,5,0" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource SimulTextBlock}"/>
|
||||
<TextBlock Text="{Binding FValue}" Grid.Row="1" Grid.Column="2" FontSize="15" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" TextAlignment="Right" Margin="0,5,5,5" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding MachineAxisList}" Margin="0,0,0,5">
|
||||
VerticalAlignment="Center" TextAlignment="Right" Margin="0,5,5,5"
|
||||
Style="{StaticResource SimulTextBlock}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding MachineAxisList}" Margin="0,0,0,5">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,0,0,5">
|
||||
@@ -89,11 +96,12 @@
|
||||
|
||||
<TextBlock Text="{Binding Token}" FontSize="15"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
TextWrapping="Wrap" TextAlignment="Center"/>
|
||||
TextWrapping="Wrap" TextAlignment="Center"
|
||||
Style="{StaticResource SimulTextBlock}"/>
|
||||
<TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1"
|
||||
IsReadOnly="{Binding IsReadOnlyAxesValue}"
|
||||
IsEnabled="{Binding IsEnabledAxesValue}"
|
||||
TextAlignment="Right">
|
||||
Style="{StaticResource AxisTextBox}">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding ManualAxisModifyCommand}"/>
|
||||
</TextBox.InputBindings>
|
||||
@@ -104,10 +112,9 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</Border>
|
||||
|
||||
<GroupBox Header="{Binding EstimationMsg}"
|
||||
IsEnabled="{Binding Estimation_IsEnabled}"
|
||||
<GroupBox Header="{Binding EstimationMsg}" Style="{StaticResource GroupBoxRow}"
|
||||
DataContext="{Binding MyEstim}">
|
||||
|
||||
<StackPanel Margin="2,2,2,0">
|
||||
@@ -116,8 +123,7 @@
|
||||
|
||||
<TextBlock Text="{Binding TimeMsg}"/>
|
||||
<TextBox Text="{Binding Time, Mode=OneWay}"
|
||||
IsReadOnly="True"
|
||||
TextAlignment="Right"/>
|
||||
Style="{StaticResource EstimateTextBox}"/>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
@@ -125,28 +131,25 @@
|
||||
|
||||
<TextBlock Text="{Binding CutLenMsg}"/>
|
||||
<TextBox Text="{Binding CutLen, Mode=OneWay}"
|
||||
IsReadOnly="True"
|
||||
TextAlignment="Right"/>
|
||||
Style="{StaticResource EstimateTextBox}"/>
|
||||
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
|
||||
<TextBlock Text="{Binding NetAreaMsg}"/>
|
||||
<TextBox Text="{Binding NetArea, Mode=OneWay}"
|
||||
IsReadOnly="True"
|
||||
TextAlignment="Right"/>
|
||||
Style="{StaticResource EstimateTextBox}"/>
|
||||
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
|
||||
<TextBlock Text="{Binding UsageMsg}"/>
|
||||
<TextBox Text="{Binding Usage, Mode=OneWay}"
|
||||
IsReadOnly="True"
|
||||
TextAlignment="Right"/>
|
||||
Style="{StaticResource EstimateTextBox}"/>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<Button Content="{Binding DetailsMsg}" Height="30"
|
||||
<Button Content="{Binding DetailsMsg}" Style="{StaticResource SimulPanel_TextButton}"
|
||||
Command="{Binding Details_Command}"
|
||||
Margin="0,0,0,2"/>
|
||||
|
||||
|
||||
@@ -17,7 +17,13 @@ Public Class SimulTabVM
|
||||
|
||||
Public ReadOnly Property MachViewMsg As String
|
||||
Get
|
||||
Return "Vista macchina"
|
||||
Return EgtMsg(91667)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property EstimationMsg As String
|
||||
Get
|
||||
Return EgtMsg(91668)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -137,10 +143,10 @@ Public Class SimulTabVM
|
||||
MyEstim.Estimation_IsEnabled = False
|
||||
End If
|
||||
' Impostazioni box stime
|
||||
NotifyPropertyChanged("Time")
|
||||
NotifyPropertyChanged("CutLen")
|
||||
NotifyPropertyChanged("NetArea")
|
||||
NotifyPropertyChanged("Usage")
|
||||
MyEstim.NotifyPropertyChanged("Time")
|
||||
MyEstim.NotifyPropertyChanged("CutLen")
|
||||
MyEstim.NotifyPropertyChanged("NetArea")
|
||||
MyEstim.NotifyPropertyChanged("Usage")
|
||||
' Nascondo eventuali pezzi in parcheggio
|
||||
HideParkedParts()
|
||||
' Nascondo eventuale contorno da foto
|
||||
|
||||
@@ -21,9 +21,11 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Header="{Binding CurrentLanguageMsg}"
|
||||
Style="{StaticResource GroupBoxOptionWnd}"
|
||||
Grid.Column="0" Margin="0,0,5,5">
|
||||
<UniformGrid Rows="2">
|
||||
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
|
||||
Style="{DynamicResource OptionWnd_ComboBox}"
|
||||
SelectedItem="{Binding SelLanguage}" DisplayMemberPath="Name"/>
|
||||
<TextBlock Text="{Binding LanguageAdvertMsg}" TextWrapping="Wrap"
|
||||
TextAlignment="Center"/>
|
||||
@@ -31,20 +33,25 @@
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="{Binding MeasureUnitMsg}"
|
||||
Style="{StaticResource GroupBoxOptionWnd}"
|
||||
Grid.Column="1" Margin="0,0,5,5">
|
||||
<ComboBox ItemsSource="{Binding MeasureUnitList, Mode=OneWay}"
|
||||
Style="{DynamicResource OptionWnd_ComboBox}"
|
||||
SelectedIndex="{Binding SelMeasureUnit}"
|
||||
Height="25" Width="60"/>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="{Binding SideAngleHdr}"
|
||||
Style="{StaticResource GroupBoxOptionWnd}"
|
||||
Grid.Row="1" Margin="0,0,5,5">
|
||||
<ComboBox ItemsSource="{Binding SideModeList, Mode=OneWay}"
|
||||
Style="{DynamicResource OptionWnd_ComboBox}"
|
||||
SelectedIndex="{Binding SelSideModeIndex}"
|
||||
Height="25"/>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="{Binding DirectInsertHdr}"
|
||||
Style="{StaticResource GroupBoxOptionWnd}"
|
||||
Grid.Row="2" Margin="0,0,5,5">
|
||||
<UniformGrid Rows="2">
|
||||
<Grid>
|
||||
@@ -63,7 +70,8 @@
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="{Binding TextColorMsg}"
|
||||
Grid.Column="1" Grid.Row="1" Margin="0,0,5,5">
|
||||
Style="{StaticResource GroupBoxOptionWnd}"
|
||||
Grid.Column="1" Grid.Row="1" Margin="0,0,5,5">
|
||||
<Button Height="25" Width="60" Margin="0,5,0,0" Background="{Binding TextColorBackground}"
|
||||
Command="{Binding ChangeColorCommand}" IsEnabled="{Binding bSelOk}" Style="{StaticResource Option_ColorButton}">
|
||||
</Button>
|
||||
@@ -71,6 +79,7 @@
|
||||
|
||||
<!--SideAngle from color-->
|
||||
<GroupBox Name="ColorToSideAngGpBx" Header="{Binding ColorToSideAngMsg}"
|
||||
Style="{StaticResource GroupBoxOptionWnd}"
|
||||
Grid.Column="0" Grid.Row="3" Margin="0,0,5,5" >
|
||||
|
||||
<Grid>
|
||||
@@ -146,6 +155,7 @@
|
||||
|
||||
<!--Engrave from color-->
|
||||
<GroupBox Name="ColorToEngraveGpBx" Header="{Binding ColorToEngraveMsg}"
|
||||
Style="{StaticResource GroupBoxOptionWnd}"
|
||||
Grid.Column="1" Grid.Row="3" Margin="0,0,5,5" >
|
||||
|
||||
<Grid>
|
||||
|
||||
@@ -71,7 +71,7 @@ Public Class OptionWindowVM
|
||||
OmagOFFICEMap.refRawPartTabVM.Refresh(PrevMeasureUnit)
|
||||
OmagOFFICEMap.refNestingTabVM.Refresh(PrevMeasureUnit)
|
||||
OmagOFFICEMap.refMoveRawModeVM.Refresh(PrevMeasureUnit)
|
||||
OmagOFFICEMap.refSimulTabVM.MySimul.Refresh(PrevMeasureUnit)
|
||||
If Not IsNothing(OmagOFFICEMap.refSimulTabVM.MySimul) Then OmagOFFICEMap.refSimulTabVM.MySimul.Refresh(PrevMeasureUnit)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -1,35 +1,66 @@
|
||||
<EgtFloating:EgtFloatingManager x:Class="ProjectV"
|
||||
<DockPanel x:Class="ProjectV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE">
|
||||
|
||||
<EgtFloating:EgtFloatingTray x:Name="LEFTTRAY" DockPanel.Dock="Left">
|
||||
<OmagOFFICE:OptionPanelV DataContext="{StaticResource OptionPanelVM}"
|
||||
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
|
||||
Background="{StaticResource Omag_DarkGray}">
|
||||
|
||||
<DockPanel x:Name="LEFTTRAY" DockPanel.Dock="Left" Background="Transparent">
|
||||
<OmagOFFICE:OptionPanelV DataContext="{StaticResource OptionPanelVM}"
|
||||
Height="{Binding MaxHeight,ElementName=LEFTTRAY}"/>
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
|
||||
<EgtFloating:EgtFloatingTray x:Name="TOPTRAY" DockPanel.Dock="Top">
|
||||
<OmagOFFICE:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
|
||||
<OmagOFFICE:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||
<OmagOFFICE:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||
<OmagOFFICE:VeinMatchPanelV DataContext="{StaticResource VeinMatchPanelVM}"/>
|
||||
<OmagOFFICE:MachinePanelV DataContext="{StaticResource MachinePanelVM}"/>
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
|
||||
<EgtFloating:EgtFloatingTray x:Name="BOTTOMTRAY" DockPanel.Dock="Bottom">
|
||||
<EgtWPFLib5:EgtMachGroupPanelV DataContext="{StaticResource MachGroupPanelVM}"
|
||||
Background="{StaticResource Omag_Gray}"
|
||||
BorderBrush="{StaticResource Omag_Gray}"
|
||||
</DockPanel>
|
||||
|
||||
<DockPanel x:Name="TOPTRAY" DockPanel.Dock="Top" Background="Transparent">
|
||||
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Width="{Binding}">-->
|
||||
<!--<DockPanel>
|
||||
<OmagOFFICE:MachinePanelV DataContext="{StaticResource MachinePanelVM}" DockPanel.Dock="Left"/>
|
||||
<OmagOFFICE:VeinMatchPanelV DataContext="{StaticResource VeinMatchPanelVM}" />
|
||||
<OmagOFFICE:PrintPanelV DataContext="{StaticResource PrintPanelVM}" />
|
||||
<OmagOFFICE:ShowPanelV DataContext="{StaticResource ShowPanelVM}" DockPanel.Dock="Right"/>
|
||||
<OmagOFFICE:ViewPanelV DataContext="{StaticResource ViewPanelVM}" DockPanel.Dock="Right"/>
|
||||
<OmagOFFICE:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}" DockPanel.Dock="Right"/>
|
||||
</DockPanel>-->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="19.75*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<OmagOFFICE:MachinePanelV Grid.Column="0" DataContext="{StaticResource MachinePanelVM}"/>
|
||||
<OmagOFFICE:VeinMatchPanelV Grid.Column="1" DataContext="{StaticResource VeinMatchPanelVM}"/>
|
||||
<OmagOFFICE:PrintPanelV Grid.Column="2" DataContext="{StaticResource PrintPanelVM}"/>
|
||||
<OmagOFFICE:ShowPanelV Grid.Column="5" DataContext="{StaticResource ShowPanelVM}"/>
|
||||
<OmagOFFICE:ViewPanelV Grid.Column="4" DataContext="{StaticResource ViewPanelVM}"/>
|
||||
<OmagOFFICE:InstrumentPanelV Grid.Column="6" DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||
</Grid>
|
||||
<!--<OmagOFFICE:MachinePanelV DataContext="{StaticResource MachinePanelVM}"/>
|
||||
<OmagOFFICE:VeinMatchPanelV DataContext="{StaticResource VeinMatchPanelVM}"/>
|
||||
<OmagOFFICE:PrintPanelV DataContext="{StaticResource PrintPanelVM}"/>
|
||||
<OmagOFFICE:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
|
||||
<OmagOFFICE:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||
<OmagOFFICE:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>-->
|
||||
<!--</StackPanel>-->
|
||||
</DockPanel>
|
||||
|
||||
<DockPanel x:Name="BOTTOMTRAY" DockPanel.Dock="Bottom" Background="Transparent">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Width="{Binding}">
|
||||
<OmagOFFICE:MyMachGroupPanelV DataContext="{StaticResource MachGroupPanelVM}"/>
|
||||
<!--<EgtWPFLib5:EgtMachGroupPanelV DataContext="{StaticResource MachGroupPanelVM}"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
RepaetButtonStyle="{StaticResource CustomScrollBarButton}"
|
||||
MachGroupButtonStyle="{StaticResource {x:Type ToggleButton}}"
|
||||
IsToolBar="False"
|
||||
IsTopDockable="False" IsBottomDockable="True" IsLeftDockable="False"
|
||||
IsRightDockable="False"/>
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
|
||||
<!--Scena restituita sotto forma di WindowsFormsHost-->
|
||||
<OmagOFFICE:SceneHostV/>
|
||||
|
||||
</EgtFloating:EgtFloatingManager>
|
||||
IsTopDockable="False" IsBottomDockable="false" IsLeftDockable="False"
|
||||
IsRightDockable="False"/>-->
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
|
||||
<OmagOFFICE:SceneHostV />
|
||||
|
||||
</DockPanel>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Public Class ProjectV
|
||||
|
||||
Private Sub LoadPage() Handles Me.Loaded
|
||||
OmagOFFICEMap.SetRefProjectV(Me)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 703 B |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 637 B |