Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 57cf143306 | |||
| a804043d2e | |||
| 59865b140e | |||
| 959cbfb28b | |||
| 6023318ff4 | |||
| d39c5bec47 | |||
| 54522e0733 | |||
| 11e3cfc7bc | |||
| 114fc2dfa5 | |||
| 885495b13d | |||
| c6c8d62e84 | |||
| a72259b326 | |||
| ba0f00413d | |||
| 2d39dcacc3 | |||
| f4887ab587 | |||
| 6cb04a1216 | |||
| 8dcebea39c | |||
| 5b84a0cefe | |||
| f0d08c562e | |||
| 0e77455500 | |||
| d1247d5c7e | |||
| bc06203edd | |||
| c768b80802 | |||
| ae204b7ee2 | |||
| d21067988c | |||
| 9c503cdb5c | |||
| d20e2bf2ec | |||
| 7ec1ffa529 | |||
| 4128fd8713 | |||
| 87d09b3f19 | |||
| 216b0a37b6 |
@@ -0,0 +1,20 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class AlzAndFrontVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<UserControl x:Class="AlzAndFrontV"
|
||||
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">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Visibility="{Binding Legenda_Visibility}"
|
||||
Grid.Row="0"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding FirstColumnMsg}" Grid.Column="1" HorizontalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding SecondColumnMsg}" Grid.Column="2" HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<EgtWPFLib5:EgtScrollViewer VerticalScrollBarVisibility="Auto"
|
||||
Focusable="false"
|
||||
Padding="3"
|
||||
Grid.Row="1">
|
||||
<ItemsControl ItemsSource="{Binding SideEntityList}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,0,0,2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sEntityName}"
|
||||
VerticalAlignment="Center"/>
|
||||
<!--Drip e Engrave-->
|
||||
<UniformGrid Grid.Column="1" Columns="3" Rows="1">
|
||||
<CheckBox IsChecked="{Binding bIsChecked}"
|
||||
Grid.Column="1"
|
||||
Visibility="{Binding Check_Visibility}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding GrphShortStart}"
|
||||
Visibility="{Binding Value_Visibility_DE}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding GrphShortEnd}"
|
||||
Visibility="{Binding Value_Visibility_DE}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</UniformGrid>
|
||||
<!--SideAngle-->
|
||||
<UniformGrid Grid.Column="1" Columns="2" Rows="1">
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding GrphSideAngle}"
|
||||
Visibility="{Binding Value_Visibility}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding GrphSideHeel}"
|
||||
Visibility="{Binding Value_Visibility}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</EgtWPFLib5:EgtScrollViewer>
|
||||
|
||||
<Grid Visibility="{Binding Parameter1_Visibility}"
|
||||
Grid.Row="2"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Parameter1Msg}" Grid.Row="0"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter1}"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Visibility="{Binding Parameter1_Visibility}"
|
||||
Grid.Row="3"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Parameter2Msg}" Grid.Row="1"/>
|
||||
|
||||
<EgtWPFLib5:EgtTextBox Visibility="{Binding Parameter2_Visibility}"
|
||||
Text="{Binding Parameter2}"
|
||||
Grid.Column="1"/>
|
||||
<UniformGrid Grid.Column="1" Columns="2"
|
||||
Visibility="{Binding Parameter2ab_Visibility}">
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter2a}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter2b}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
|
||||
<Grid Visibility="{Binding Parameter23_Visibility}"
|
||||
Grid.Row="4"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Parameter3Msg}" Grid.Row="2"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter3}"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Visibility="{Binding Parameter4_Visibility}"
|
||||
Grid.Row="5"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Parameter4Msg}" Grid.Row="2"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter4}"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,13 @@
|
||||
Public Class AlzAndFrontV
|
||||
|
||||
Private WithEvents m_AlzAndFrontVM As AlzAndFrontVM
|
||||
|
||||
Sub New(AlzAndFrontVM As AlzAndFrontVM)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = AlzAndFrontVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_AlzAndFrontVM = AlzAndFrontVM
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -300,9 +300,16 @@ Public Class CompoListPageVM
|
||||
m_BackVisibility = Visibility.Visible
|
||||
m_SideEntity_Visibility = Visibility.Collapsed
|
||||
Else
|
||||
LoadInternalCompoList()
|
||||
m_BackVisibility = Visibility.Visible
|
||||
m_SideEntity_Visibility = Visibility.Visible
|
||||
' differenzio il caso di AlzAndFront
|
||||
If CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront Then
|
||||
' carico la pagina per la definizione delle componenti Alette
|
||||
m_BackVisibility = Visibility.Visible
|
||||
m_SideEntity_Visibility = Visibility.Hidden
|
||||
Else
|
||||
LoadInternalCompoList()
|
||||
m_BackVisibility = Visibility.Visible
|
||||
m_SideEntity_Visibility = Visibility.Visible
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged("BackVisibility")
|
||||
NotifyPropertyChanged("SideEntity_Visibility")
|
||||
@@ -449,8 +456,32 @@ Public Class CompoListPageVM
|
||||
If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelCompo) Then
|
||||
CompoWindowMap.refCompoWindowVM.m_SelCompoFamily = Nothing
|
||||
InitCompoListPage()
|
||||
ElseIf CompoWindowMap.refCompoWindowVM.m_bSelInternalCompo Then
|
||||
'CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.PARAM
|
||||
CompoWindowMap.refCompoWindowVM.SetCompoPage(CompoWindowVM.CompoPageOpt.PARAM)
|
||||
CompoWindowMap.refCompoParamPageVM.MyInitCompoParamPage()
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, CompoParamPageVM.COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, CompoParamPageVM.COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, CompoParamPageVM.COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||
EgtZoom(ZM.ALL)
|
||||
CompoWindowMap.refCompoWindowVM.m_bSelInternalCompo = False
|
||||
' aggiorno la lista dei parametri da visualizzare a schermo
|
||||
CompoWindowMap.refCompoParamPageVM.SetCompoParamList(CompoWindowMap.refCompoParamPageVM.CompoParamOutLoopList)
|
||||
' disbilito la modifica del componente piano cucicna/bagno corrente
|
||||
For Each Item In CompoWindowMap.refCompoParamPageVM.CompoParamList
|
||||
If TypeOf (Item) Is TextParamItem Then
|
||||
Dim TxtParam As TextParamItem = DirectCast(Item, TextParamItem)
|
||||
TxtParam.IsEnable = False
|
||||
ElseIf TypeOf (Item) Is CheckParamItem Then
|
||||
Dim ChkParam As CheckParamItem = DirectCast(Item, CheckParamItem)
|
||||
ChkParam.IsEnable = False
|
||||
End If
|
||||
Next
|
||||
CompoWindowMap.refCompoParamPageVM.ListParamIsEnable = False
|
||||
Else
|
||||
CompoWindowMap.refCompoWindowVM.m_SelCompo = Nothing
|
||||
CompoWindowMap.refCompoParamPageVM.ListParamIsEnable = True
|
||||
InitCompoListPage()
|
||||
EgtNewFile()
|
||||
EgtDraw()
|
||||
|
||||
@@ -307,7 +307,8 @@ Public Class CompoManagerVM
|
||||
' Passo al contesto principale
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
' Inserisco il componente nel DB geometrico principale
|
||||
CompoWindowMap.refCompoWindowVM.MakeInsert(InsNbr, m_PartName)
|
||||
'CompoWindowMap.refCompoWindowVM.MakeInsert(InsNbr, m_PartName)
|
||||
CompoWindowMap.refCompoWindowVM.MakeMultipleInsert(InsNbr, m_PartName)
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino riferimento con delegato
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Name}" VerticalAlignment="Center"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Value}"/>
|
||||
Text="{Binding Value}" IsEnabled="{Binding IsEnable}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OmagOFFICE:CheckParamItem}">
|
||||
@@ -100,7 +100,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
<CheckBox Grid.Column="1"
|
||||
IsChecked="{Binding Value}"
|
||||
IsChecked="{Binding Value}" IsEnabled="{Binding IsEnable}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
@@ -123,6 +123,11 @@
|
||||
Command="{Binding InternalCommand}"
|
||||
Visibility="{Binding Internal_Visibility}"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
|
||||
<Button Content="{Binding AlzAndFrontMsg}"
|
||||
Command="{Binding AlzAndFrontCommand}"
|
||||
Visibility="{Binding AlzAndFront_Visibility}"
|
||||
Style="{StaticResource CompoWindow_Button}"/>
|
||||
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5"
|
||||
|
||||
@@ -23,12 +23,35 @@ Public Class CompoParamPageVM
|
||||
Friend Const COMPO_LAYER_QUOTATURE As String = "Quotature"
|
||||
Friend Const COMPO_LAYER_ETICHETTE As String = "Etichette"
|
||||
|
||||
' questo parametro diventa False in uscita dalla pagine Alzatine o CompoInterni
|
||||
Public ListParamIsEnable As Boolean = True
|
||||
|
||||
Private m_SideEntityControlVM As SideEntityControlVM
|
||||
|
||||
Private m_CompoParamList As New ObservableCollection(Of CompoParamItem)
|
||||
Public ReadOnly Property CompoParamList As ObservableCollection(Of CompoParamItem)
|
||||
Get
|
||||
Return m_CompoParamList
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetCompoParamList(CurrList As ObservableCollection(Of CompoParamItem))
|
||||
m_CompoParamList.Clear()
|
||||
' eseguo una copia dei parametri da una lista all'altra
|
||||
For Each Item In CurrList
|
||||
Dim NewCompoItem As CompoParamItem = Item
|
||||
m_CompoParamList.Add(NewCompoItem)
|
||||
Next
|
||||
NotifyPropertyChanged("CompoParamList")
|
||||
End Sub
|
||||
|
||||
|
||||
' lista dei parametri del piano cucina (da mostrare quando eseguo la funzione Back)
|
||||
Private m_CompoParamOutLoopList As New ObservableCollection(Of CompoParamItem)
|
||||
Public ReadOnly Property CompoParamOutLoopList As ObservableCollection(Of CompoParamItem)
|
||||
Get
|
||||
Return m_CompoParamOutLoopList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Internal_Visibility As Visibility
|
||||
Public Property Internal_Visibility As Visibility
|
||||
@@ -41,6 +64,19 @@ Public Class CompoParamPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
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)
|
||||
m_AlzAndFront_Visibility = value
|
||||
NotifyPropertyChanged("AlzAndFront_Visibility")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_AddRemove_Visibility As Visibility
|
||||
Public Property AddRemove_Visibility As Visibility
|
||||
Get
|
||||
@@ -129,7 +165,7 @@ Public Class CompoParamPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SideEntityControlVM As SideEntityControlVM
|
||||
#Region "SideAngle"
|
||||
|
||||
Private m_SideAngle_IsChecked As Boolean
|
||||
Public Property SideAngle_IsChecked As Boolean
|
||||
@@ -172,9 +208,17 @@ Public Class CompoParamPageVM
|
||||
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
||||
' Attivo layer delle misure
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||
|
||||
If Not ListParamIsEnable Then
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||
Else
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||
End If
|
||||
|
||||
End If
|
||||
NotifyPropertyChanged("SideAngle_IsChecked")
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -192,6 +236,10 @@ Public Class CompoParamPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' SideAngle
|
||||
|
||||
#Region "FiloTop"
|
||||
|
||||
Private m_FiloTop_IsChecked As Boolean
|
||||
Public Property FiloTop_IsChecked As Boolean
|
||||
Get
|
||||
@@ -233,9 +281,17 @@ Public Class CompoParamPageVM
|
||||
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
||||
' Attivo layer delle misure
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||
|
||||
If Not ListParamIsEnable Then
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||
Else
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||
End If
|
||||
|
||||
End If
|
||||
NotifyPropertyChanged("FiloTop_IsChecked")
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -253,6 +309,10 @@ Public Class CompoParamPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FiloTop
|
||||
|
||||
#Region "Drip"
|
||||
|
||||
Private m_Drip_IsChecked As Boolean
|
||||
Public Property Drip_IsChecked As Boolean
|
||||
Get
|
||||
@@ -293,9 +353,17 @@ Public Class CompoParamPageVM
|
||||
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
||||
' Attivo layer delle misure
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||
|
||||
If Not ListParamIsEnable Then
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||
Else
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||
End If
|
||||
|
||||
End If
|
||||
NotifyPropertyChanged("Drip_IsChecked")
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -313,6 +381,10 @@ Public Class CompoParamPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Drip
|
||||
|
||||
#Region "Engrave"
|
||||
|
||||
Private m_Engrave_IsChecked As Boolean
|
||||
Public Property Engrave_IsChecked As Boolean
|
||||
Get
|
||||
@@ -339,8 +411,13 @@ Public Class CompoParamPageVM
|
||||
CompoWindowMap.refCompoSceneHostV.CompoScene,
|
||||
SideEntityControlVM.ModeOpt.ENGRAVE)
|
||||
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
|
||||
If m_SideEntityControlVM.SideEntityList.Count < 1 Then
|
||||
' eventulmente stamnpare messaggio!
|
||||
' OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
' OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Lavorazioni non disponibile", MSG_TYPE.WARNING)
|
||||
End If
|
||||
Else
|
||||
SideAngle_IsEnabled = True
|
||||
SideAngle_IsEnabled = True
|
||||
Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDripSaw)
|
||||
FiloTop_IsEnabled = True
|
||||
@@ -354,9 +431,17 @@ Public Class CompoParamPageVM
|
||||
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
||||
' Attivo layer delle misure
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||
|
||||
If Not ListParamIsEnable Then
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||
Else
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||
End If
|
||||
|
||||
End If
|
||||
NotifyPropertyChanged("Engrave_IsChecked")
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -374,6 +459,8 @@ Public Class CompoParamPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Engrave
|
||||
|
||||
Private m_SideEntityControl As SideEntityControlV
|
||||
Public Property SideEntityControl As SideEntityControlV
|
||||
Get
|
||||
@@ -385,6 +472,8 @@ Public Class CompoParamPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property InternalMsg As String
|
||||
@@ -392,6 +481,12 @@ Public Class CompoParamPageVM
|
||||
Return EgtMsg(MSG_COMPONENTPAGEUC + 47)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property AlzAndFrontMsg As String
|
||||
Get
|
||||
Return "Alzatine e frontalini"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_AddMsg As String
|
||||
Public Property AddMsg As String
|
||||
Get
|
||||
@@ -432,6 +527,7 @@ Public Class CompoParamPageVM
|
||||
|
||||
' definizione comandi
|
||||
Private m_cmdInternal As ICommand
|
||||
Private m_cmdAlzAndFront As ICommand
|
||||
Private m_cmdAdd As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
Private m_cmdBack As ICommand
|
||||
@@ -471,7 +567,7 @@ Public Class CompoParamPageVM
|
||||
CompoWindowMap.refCompoSceneHostV.CompoScene.ZoomAll()
|
||||
' Imposto messaggio aggiungi
|
||||
AddMsg = EgtMsg(MSG_COMPONENTPAGEUC + 48)
|
||||
' altrimenti se è un compo interno
|
||||
' altrimenti se è un compo interno
|
||||
Else
|
||||
If Not bOk Then
|
||||
EgtOutLog("Error in Component " & CompoWindowMap.refCompoWindowVM.m_SelInternalCompo.LuaPath)
|
||||
@@ -480,7 +576,7 @@ Public Class CompoParamPageVM
|
||||
' Imposto messaggio conferma
|
||||
AddMsg = EgtMsg(MSG_COMPONENTPAGEUC + 50)
|
||||
End If
|
||||
' leggo variabili e aggiorno griglia
|
||||
' leggo variabili e aggiorno griglia
|
||||
ReadAndShowVariables()
|
||||
' visualizzo/nascondo bottoni
|
||||
If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelInternalCompo) Then
|
||||
@@ -491,8 +587,54 @@ Public Class CompoParamPageVM
|
||||
EgtLuaGetGlobBoolVar(LUA_CMP_WITHINT, bHasInternalCompo)
|
||||
Internal_Visibility = If(bHasInternalCompo, Visibility.Visible, Visibility.Collapsed)
|
||||
SideEntity_Visibility = Visibility.Visible
|
||||
' verifio se abilitare il bottone per inserire le Alz&Front
|
||||
Dim sCMPName As String = String.Empty
|
||||
If EgtLuaGetGlobStringVar("CMP.Nome", sCMPName) Then
|
||||
If sCMPName.StartsWith("PCucina") Or sCMPName.StartsWith("PBagno") Then
|
||||
AlzAndFront_Visibility = Visibility.Visible
|
||||
Else
|
||||
AlzAndFront_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Internal_Visibility = Visibility.Collapsed
|
||||
AlzAndFront_Visibility = Visibility.Collapsed
|
||||
AddRemove_Visibility = Visibility.Visible
|
||||
Back_Visibility = Visibility.Collapsed
|
||||
SideEntity_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
' porto in CompoParam il CompoManager
|
||||
CompoWindowMap.refCompoListPageVM.CompoManagerControl = Nothing
|
||||
CompoManagerControl = CompoWindowMap.refCompoWindowVM.CompoManagerV
|
||||
' lancio inizializzazione CompoManager
|
||||
CompoWindowMap.refCompoManagerVM.InitCompoManager()
|
||||
End Sub
|
||||
|
||||
' gestione speciale per componenti piani cucina e piani bagno
|
||||
Friend Sub MyInitCompoParamPage()
|
||||
' Pulisco l'ambiente lua
|
||||
ResetLuaVariables()
|
||||
' leggo variabili e aggiorno griglia
|
||||
ReadAndShowVariables()
|
||||
' visualizzo/nascondo bottoni
|
||||
If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelInternalCompo) Then
|
||||
AddRemove_Visibility = Visibility.Collapsed
|
||||
Back_Visibility = Visibility.Visible
|
||||
Internal_Visibility = Visibility.Visible
|
||||
AlzAndFront_Visibility = Visibility.Visible
|
||||
SideEntity_Visibility = Visibility.Visible
|
||||
' verifio se abilitare il bottone per inserire le Alz&Front
|
||||
Dim sCMPName As String = String.Empty
|
||||
If EgtLuaGetGlobStringVar("CMP.Nome", sCMPName) Then
|
||||
If sCMPName.StartsWith("PCucina") Or sCMPName.StartsWith("PBagno") Then
|
||||
AlzAndFront_Visibility = Visibility.Visible
|
||||
Else
|
||||
AlzAndFront_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Internal_Visibility = Visibility.Collapsed
|
||||
AlzAndFront_Visibility = Visibility.Collapsed
|
||||
AddRemove_Visibility = Visibility.Visible
|
||||
Back_Visibility = Visibility.Collapsed
|
||||
SideEntity_Visibility = Visibility.Collapsed
|
||||
@@ -620,7 +762,14 @@ Public Class CompoParamPageVM
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub Internal(ByVal param As Object)
|
||||
' creo una copia della lista dei parametri del piano cucina
|
||||
m_CompoParamOutLoopList.Clear()
|
||||
For i As Integer = 0 To m_CompoParamList.Count - 1
|
||||
m_CompoParamOutLoopList.Add(m_CompoParamList(i))
|
||||
Next
|
||||
CompoWindowMap.refCompoWindowVM.m_SelInternalCompo = Nothing
|
||||
CompoWindowMap.refCompoWindowVM.m_bSelInternalCompo = True
|
||||
CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront = False
|
||||
CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.LIST
|
||||
' Nascondo layer etichette e quotature
|
||||
Dim Pz As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||
@@ -632,6 +781,61 @@ Public Class CompoParamPageVM
|
||||
|
||||
#End Region ' InternalCommand
|
||||
|
||||
#Region "AlzAndFrontCommand"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property AlzAndFrontCommand() As ICommand
|
||||
Get
|
||||
If m_cmdAlzAndFront Is Nothing Then
|
||||
m_cmdAlzAndFront = New Command(AddressOf AlzAndFront)
|
||||
End If
|
||||
Return m_cmdAlzAndFront
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub AlzAndFront(ByVal param As Object)
|
||||
' creo una copia della lista dei parametri del piano cucina
|
||||
m_CompoParamOutLoopList.Clear()
|
||||
For i As Integer = 0 To m_CompoParamList.Count - 1
|
||||
m_CompoParamOutLoopList.Add(m_CompoParamList(i))
|
||||
Next
|
||||
|
||||
CompoWindowMap.refCompoWindowVM.m_SelInternalCompo = Nothing
|
||||
CompoWindowMap.refCompoWindowVM.m_bSelInternalCompo = False
|
||||
CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront = True
|
||||
|
||||
' disabilito i comandi seguenti
|
||||
m_SideAngle_IsEnabled = False
|
||||
NotifyPropertyChanged("SideAngle_IsEnabled")
|
||||
m_Drip_IsEnabled = False
|
||||
NotifyPropertyChanged("Drip_IsEnabled")
|
||||
m_Engrave_IsEnabled = False
|
||||
NotifyPropertyChanged("Engrave_IsEnabled")
|
||||
m_FiloTop_IsEnabled = False
|
||||
NotifyPropertyChanged("FiloTop_IsEnabled")
|
||||
Measure_Visibility = Visibility.Collapsed
|
||||
CompoManagerControl_Visibility = Visibility.Collapsed
|
||||
Back_Visibility = Visibility.Visible
|
||||
|
||||
' Nascondo layer etichette e quotature del disegno corrente
|
||||
Dim Pz As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(Pz, "LayAux"), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(Pz, "Etichette"), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(Pz, "Quotature"), GDB_ST.OFF)
|
||||
|
||||
' Imposto il loop interno
|
||||
CompoWindowMap.refCompoSceneHostV.SelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
||||
|
||||
m_SideEntityControlVM = New SideEntityControlVM(SideEntityControlVM.CallingWindowOpt.COMPO,
|
||||
CompoWindowMap.refCompoSceneHostV.CompoScene,
|
||||
SideEntityControlVM.ModeOpt.ALZANDFRONT)
|
||||
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' AlzAndFrontCommand
|
||||
|
||||
#Region "AddCommand"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
@@ -726,13 +930,54 @@ Public Class CompoParamPageVM
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub Back(ByVal param As Object)
|
||||
' se sto uscendo dalla pagina delle alzatine (rimanendo nel componente del piano cucina/bagno)
|
||||
If CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront Then
|
||||
SideAngle_IsEnabled = True
|
||||
Engrave_IsEnabled = True
|
||||
Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDripSaw)
|
||||
If Not IsNothing(m_SideEntityControlVM) Then
|
||||
m_SideEntityControlVM.Close()
|
||||
m_SideEntityControlVM = Nothing
|
||||
SideEntityControl = Nothing
|
||||
End If
|
||||
Measure_Visibility = Visibility.Visible
|
||||
CompoManagerControl_Visibility = Visibility.Visible
|
||||
Back_Visibility = Visibility.Visible
|
||||
' Deseleziono tutto
|
||||
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
||||
' Attivo layer delle misure
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||
EgtZoom(ZM.ALL)
|
||||
CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront = False
|
||||
' aggiorno la lista dei parametri da visualizzare a schermo
|
||||
SetCompoParamList(CompoParamOutLoopList)
|
||||
' disbilito la modifica del componente piano cucicna/bagno corrente
|
||||
For Each Item In CompoParamList
|
||||
If TypeOf (Item) Is TextParamItem Then
|
||||
Dim TxtParam As TextParamItem = DirectCast(Item, TextParamItem)
|
||||
TxtParam.IsEnable = False
|
||||
ElseIf TypeOf (Item) Is CheckParamItem Then
|
||||
Dim ChkParam As CheckParamItem = DirectCast(Item, CheckParamItem)
|
||||
ChkParam.IsEnable = False
|
||||
End If
|
||||
Next
|
||||
ListParamIsEnable = False
|
||||
Return
|
||||
End If
|
||||
' se sto uscendo dalla pagina dei componenti
|
||||
If CompoWindowMap.refCompoWindowVM.m_SelCompoFamily Is CompoWindowMap.refCompoWindowVM.m_SelCompo Then
|
||||
CompoWindowMap.refCompoWindowVM.m_SelCompoFamily = Nothing
|
||||
End If
|
||||
ListParamIsEnable = True
|
||||
CompoWindowMap.refCompoWindowVM.m_SelCompo = Nothing
|
||||
CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.LIST
|
||||
EgtNewFile()
|
||||
EgtDraw()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' BackCommand
|
||||
@@ -742,6 +987,7 @@ Public Class CompoParamPageVM
|
||||
End Class
|
||||
|
||||
Public Class CompoParamItem
|
||||
Inherits VMBase
|
||||
|
||||
Public Enum ParamType As Integer
|
||||
BOOL = 1
|
||||
@@ -774,6 +1020,18 @@ Public Class CompoParamItem
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public m_IsEnable As Boolean = True
|
||||
Public Property IsEnable As Boolean
|
||||
Get
|
||||
Return m_IsEnable
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_IsEnable = value
|
||||
NotifyPropertyChanged("IsEnable")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Sub New(nInd As Integer, sName As String, nType As ParamType)
|
||||
m_nInd = nInd
|
||||
m_sName = sName
|
||||
|
||||
@@ -28,6 +28,9 @@ Public Class CompoWindowVM
|
||||
Friend m_SelCompo As CompoItem = Nothing
|
||||
Friend m_SelInternalCompo As CompoItem = Nothing
|
||||
|
||||
Friend m_bSelAlzAndFront As Boolean = False
|
||||
Friend m_bSelInternalCompo As Boolean = False
|
||||
|
||||
Private m_sCompoDir As String = String.Empty
|
||||
Friend m_bDrawOk As Boolean = False
|
||||
|
||||
@@ -62,6 +65,15 @@ Public Class CompoWindowVM
|
||||
NotifyPropertyChanged("CompoPageControl")
|
||||
End Set
|
||||
End Property
|
||||
' utilizzato per forzare il cambio pagina senza passare dall'inizializzazione della componente
|
||||
Public Sub SetCompoPage(PageOpt As CompoPageOpt)
|
||||
If PageOpt = CompoPageOpt.LIST Then
|
||||
m_CompoPage = CompoPageOpt.LIST
|
||||
Else
|
||||
m_CompoPage = CompoPageOpt.PARAM
|
||||
End If
|
||||
NotifyPropertyChanged("CompoPageControl")
|
||||
End Sub
|
||||
|
||||
Private m_CompoListPageV As CompoListPageV
|
||||
Private m_CompoParamPageV As CompoParamPageV
|
||||
@@ -340,6 +352,224 @@ Public Class CompoWindowVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function MakeMultipleInsert(ByVal nNbr As Integer, sName As String) As Boolean
|
||||
|
||||
'Dim InsertColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
|
||||
|
||||
' Imposto il contesto corrente
|
||||
EgtSetCurrentContext(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx())
|
||||
Dim Pz As Integer = -1
|
||||
Dim NxtPz As Integer = -1
|
||||
|
||||
' Cancello layer regioni per selezione buchi
|
||||
Pz = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||
|
||||
While Pz <> -1
|
||||
' imposto il contesto corrente
|
||||
EgtSetCurrentContext(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx())
|
||||
' cerco un altro pezzo nell'elenco
|
||||
NxtPz = EgtGetNextPart(Pz)
|
||||
|
||||
Dim SelectRegion As Integer = EgtGetFirstNameInGroup(Pz, "SelectRegion")
|
||||
EgtErase(SelectRegion)
|
||||
' Cancello layer etichette, quotatura,ausiliario e box
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "LayAux"))
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "Etichette"))
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "Quotature"))
|
||||
EgtErase(EgtGetFirstNameInGroup(Pz, "Box"))
|
||||
|
||||
' Cancello layer etichette dei componenti interni (buchi)
|
||||
Dim nHLId As Integer = EgtGetFirstNameInGroup(Pz, "HoleLabels")
|
||||
While nHLId <> GDB_ID.NULL
|
||||
EgtErase(nHLId)
|
||||
nHLId = EgtGetFirstNameInGroup(Pz, "HoleLabels")
|
||||
End While
|
||||
|
||||
' Attivo visualizzazione misura
|
||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(Pz, NAME_REGION)
|
||||
Dim nId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||
While nId <> GDB_ID.NULL
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
End If
|
||||
nId = EgtGetNext(nId)
|
||||
End While
|
||||
|
||||
' Calcolo dimensione ingombro Pezzo tramite OutLoop
|
||||
Dim nOutLoopLayer = EgtGetFirstNameInGroup(Pz, NAME_OUTLOOP)
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nOutLoopLayer, GDB_BB.STANDARD, b3Part)
|
||||
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||
EgtMove(nRegLayId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||
|
||||
' Se pezzo con dati TRF
|
||||
If m_bTrfData Then
|
||||
' Nome da dati Trf
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = CompoWindowMap.refCompoManagerVM.sTrfOrderCode & "-" & CompoWindowMap.refCompoManagerVM.sTrfOrderDesc
|
||||
Dim sText2 As String = CompoWindowMap.refCompoManagerVM.sTrfMatCode & "-" & CompoWindowMap.refCompoManagerVM.sTrfSurfCode
|
||||
Dim sText3 As String = LenToString(b3Part.DimX(), 0) & " x " & LenToString(b3Part.DimY(), 0) & " x " & LenToString(CompoWindowMap.refCompoManagerVM.dTrfThickness, 0)
|
||||
Dim dRatio As Double = Math.Max(b3Part.DimX(), b3Part.DimY()) / Math.Min(b3Part.DimX(), b3Part.DimY())
|
||||
If dRatio < 5 Then
|
||||
sText = sText & "<br/>" & sText2 & "<br/>" & sText3
|
||||
Else
|
||||
sText = sText & " " & sText2 & " " & sText3
|
||||
End If
|
||||
EgtModifyText(nTextId, sText)
|
||||
Dim ptCen As Point3d
|
||||
EgtCenterPoint(nTextId, ptCen)
|
||||
Dim b3Text As New BBox3d
|
||||
EgtGetBBoxGlob(nTextId, GDB_BB.STANDARD, b3Text)
|
||||
Dim dCoeff As Double = Math.Min(b3Part.DimX() / b3Text.DimX(), b3Part.DimY() / b3Text.DimY()) / 1.25
|
||||
If dCoeff < 1 Then EgtScale(nTextId, New Frame3d(ptCen), dCoeff, dCoeff, dCoeff)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
' Info di pezzo da dati Trf
|
||||
EgtSetInfo(Pz, "OC", CompoWindowMap.refCompoManagerVM.sTrfOrderCode)
|
||||
EgtSetInfo(Pz, "OD", CompoWindowMap.refCompoManagerVM.sTrfOrderDesc)
|
||||
EgtSetInfo(Pz, "PC", CompoWindowMap.refCompoManagerVM.sTrfPartCode)
|
||||
EgtSetInfo(Pz, "MT", CompoWindowMap.refCompoManagerVM.sTrfMatCode)
|
||||
EgtSetInfo(Pz, "SRF", CompoWindowMap.refCompoManagerVM.sTrfSurfCode)
|
||||
EgtSetInfo(Pz, "L", DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, "W", DoubleToString(b3Part.DimY(), 1))
|
||||
EgtSetInfo(Pz, "T", CompoWindowMap.refCompoManagerVM.dTrfThickness)
|
||||
EgtSetInfo(Pz, "V1", DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, "V2", DoubleToString(b3Part.DimY(), 1))
|
||||
' Se altrimenti pezzo con dati Csv
|
||||
ElseIf m_bCsvData Then
|
||||
' Nome del pezzo
|
||||
EgtSetName(Pz, CompoWindowMap.refCompoManagerVM.sCsvName)
|
||||
' Dati Csv
|
||||
EgtSetInfo(Pz, INFO_CSV_PART, CompoWindowMap.refCompoManagerVM.sCsvName)
|
||||
EgtSetInfo(Pz, INFO_CSV_ORD, CompoWindowMap.refCompoManagerVM.sCsvOrder)
|
||||
EgtSetInfo(Pz, INFO_CSV_DIST, CompoWindowMap.refCompoManagerVM.sCsvList)
|
||||
EgtSetInfo(Pz, INFO_CSV_MAT, CurrentMachine.CurrMat.sName)
|
||||
EgtSetInfo(Pz, INFO_CSV_V1, DoubleToString(b3Part.DimX(), 1))
|
||||
EgtSetInfo(Pz, INFO_CSV_V2, DoubleToString(b3Part.DimY(), 1))
|
||||
' Se definito nome lo inserisco nel testo
|
||||
If Not String.IsNullOrWhiteSpace(CompoWindowMap.refCompoManagerVM.sCsvName) Then
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = String.Empty
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
Dim sNewText = CompoWindowMap.refCompoManagerVM.sCsvName & "<br/>" & sText
|
||||
EgtModifyText(nTextId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
' Altrimenti pezzo con dati normali
|
||||
Else
|
||||
' Se definito nome lo inserisco nel testo
|
||||
If Not String.IsNullOrWhiteSpace(sName) Then
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = String.Empty
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
Dim sNewText = sName & "<br/>" & sText
|
||||
EgtModifyText(nTextId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
' Eventuale testo per indicare il sopra (solo nel caso di rettangolo)
|
||||
If CompoWindowMap.refCompoManagerVM.Top_Visibility = Visibility.Visible And
|
||||
CompoWindowMap.refCompoManagerVM.TopIsChecked Then
|
||||
AddTopToPartRegion(nRegLayId)
|
||||
End If
|
||||
' Scrivo testi per nesting
|
||||
SideEntityControlVM.WriteSideAngleForNest(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx())
|
||||
' Imposto colore testi
|
||||
EstCalc.SetTextColor(nRegLayId)
|
||||
|
||||
' Imposto il colore del pezzo inserito nel progetto
|
||||
'EgtSetColor(nRegLayId, InsertColor)
|
||||
'Dim EntId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||
'While EntId <> GDB_ID.NULL
|
||||
' If EgtGetType(EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||
' EntId = EgtGetNext(EntId)
|
||||
'End While
|
||||
|
||||
' Esporto il pezzo in un file temporaneo
|
||||
Dim sTmpFile As String = OmagOFFICEMap.refMainWindowVM.MainWindowM.sTempDir & "\FlatPartCompo.Nge"
|
||||
If Not EgtSaveObjToFile(Pz, sTmpFile, NGE.BIN) Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
' Passo al contesto principale
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
||||
Dim bDirect As Boolean = (GetMainPrivateProfileInt(S_NEST, K_DIRECT, 0) <> 0)
|
||||
' Elimino eventuali precedenti pezzi vuoti
|
||||
EgtEraseEmptyParts()
|
||||
' Area dei nuovi pezzi
|
||||
Dim dNewArea As Double = 0
|
||||
' Se esiste il file del pezzo
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
' eseguo inserimento
|
||||
For i As Integer = 1 To nNbr
|
||||
' Inserisco il pezzo
|
||||
EgtInsertFile(sTmpFile)
|
||||
' Ne recupero l'Id
|
||||
Dim nId2 As Integer = EgtGetLastPart()
|
||||
' Aggiusto per lavorazioni
|
||||
EgtAdjustFlatPart(nId2)
|
||||
' Se dati Trf assegno nome univoco
|
||||
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
|
||||
EstCalc.StoreOnePart(nId2, True)
|
||||
' Aggiungo riferimento e lo inserisco in VeinMatching
|
||||
VeinMatching.SetRefOnPart(nId2)
|
||||
VeinMatching.AddPart(nId2, True)
|
||||
' Se richiesto posizionamento diretto, lo eseguo
|
||||
If bDirect Then
|
||||
If EstCalc.InsertOnePart(nId2, CurrentMachine.bAligned, CurrentMachine.bReducedCut) Then
|
||||
' Eventuale notifica al VeinMatching
|
||||
VeinMatching.OnInsertPartInRaw(nId2)
|
||||
End If
|
||||
End If
|
||||
|
||||
'' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||
'' verifico che il pezzo sia un Piano Cucina o un Piano Bagno o un'Aletta
|
||||
'Dim sCMP As String = String.Empty
|
||||
'EgtGetInfo(nId2, "CMP", sCMP)
|
||||
'If sCMP.StartsWith("PCucina") Or sCMP.StartsWith("PBagno") Or sCMP.StartsWith("AlzFront") Then
|
||||
' ' Aggiungo riferimento e lo inserisco in VeinMatching
|
||||
' VeinMatching.SetRefOnPart(nId2)
|
||||
' VeinMatching.AddPart(nId2, True)
|
||||
' ' Se richiesto posizionamento diretto, lo eseguo
|
||||
' If bDirect Then
|
||||
' If EstCalc.InsertOnePart(nId2, CurrentMachine.bAligned, CurrentMachine.bReducedCut) Then
|
||||
' ' Eventuale notifica al VeinMatching
|
||||
' VeinMatching.OnInsertPartInRaw(nId2)
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
'' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||
|
||||
Next
|
||||
' Cancello il file
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
End If
|
||||
' passo al pezzo successivo
|
||||
Pz = NxtPz
|
||||
End While
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Sub Close(bDialogResult As Boolean)
|
||||
RaiseEvent m_CloseWindow(bDialogResult)
|
||||
End Sub
|
||||
|
||||
@@ -14,9 +14,11 @@
|
||||
<StackPanel Margin="5,5,5,0">
|
||||
<!--TAGLIO-->
|
||||
<TextBlock Text="{Binding CurrSawingMsg}"
|
||||
Visibility="{Binding CurrSawing_Visibility}"
|
||||
Margin="0,0,0,5"/>
|
||||
<ComboBox ItemsSource="{Binding CurrSawingList}"
|
||||
SelectedItem="{Binding SelCurrSawing}"
|
||||
Visibility="{Binding CurrSawing_Visibility}"
|
||||
Margin="0,0,0,5"/>
|
||||
|
||||
<!--<TextBlock Text="{Binding AuxMachTypeMsg}"
|
||||
@@ -56,10 +58,24 @@
|
||||
<TextBlock Text="{Binding CurrWaterjettingMsg}"
|
||||
Visibility="{Binding CurrWaterjetting_Visibility}"
|
||||
Margin="0,0,0,5"/>
|
||||
<ComboBox ItemsSource="{Binding CurrWaterjettingList}"
|
||||
SelectedItem="{Binding SelCurrWaterjetting}"
|
||||
Visibility="{Binding CurrWaterjetting_Visibility}"
|
||||
Margin="0,0,0,5"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox ItemsSource="{Binding CurrWaterjettingList}"
|
||||
SelectedItem="{Binding SelCurrWaterjetting}"
|
||||
Visibility="{Binding CurrWaterjetting_Visibility}"
|
||||
Margin="0,0,5,5"/>
|
||||
|
||||
<!--Quality-->
|
||||
<ComboBox ItemsSource="{Binding CurrWaterjettingQualityList}"
|
||||
SelectedItem="{Binding SelCurrWaterjettingQuality}"
|
||||
Visibility="{Binding CurrWaterjettingQuality_Visibility}"
|
||||
Margin="5,0,0,5"
|
||||
Grid.Column="1">
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
|
||||
@@ -32,6 +32,16 @@ Public Class CurrMachWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CurrSawing_Visibility As Visibility
|
||||
Get
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
Return Visibility.Collapsed
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Saw
|
||||
|
||||
#Region " AUX MACHINING "
|
||||
@@ -257,6 +267,29 @@ Public Class CurrMachWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CurrWaterjettingQualityList As New List(Of String)
|
||||
Public Property CurrWaterjettingQualityList As List(Of String)
|
||||
Get
|
||||
Return m_CurrWaterjettingQualityList
|
||||
End Get
|
||||
Set(value As List(Of String))
|
||||
m_CurrWaterjettingQualityList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SelCurrWaterjettingQuality As String
|
||||
Public Property SelCurrWaterjettingQuality As String
|
||||
Get
|
||||
Return m_SelCurrWaterjettingQuality
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value <> m_SelCurrWaterjettingQuality Then
|
||||
m_SelCurrWaterjettingQuality = value
|
||||
CurrentMachine.sCurrWaterJettingQuality = m_SelCurrWaterjettingQuality
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CurrWaterjetting_Visibility As Visibility
|
||||
Public Property CurrWaterjetting_Visibility As Visibility
|
||||
Get
|
||||
@@ -264,7 +297,18 @@ Public Class CurrMachWindowVM
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_CurrWaterjetting_Visibility = value
|
||||
NotifyPropertyChanged("CurrWaterjetting_Visibility")
|
||||
NotifyPropertyChanged(NameOf(CurrWaterjetting_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CurrWaterjettingQuality_Visibility As Visibility
|
||||
Public Property CurrWaterjettingQuality_Visibility As Visibility
|
||||
Get
|
||||
Return m_CurrWaterjettingQuality_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_CurrWaterjettingQuality_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(CurrWaterjettingQuality_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -313,6 +357,13 @@ Public Class CurrMachWindowVM
|
||||
Return EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 10)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CurrWaterjettingQualityMsg As String
|
||||
Get
|
||||
Return "Quality"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OkMsg As String
|
||||
Get
|
||||
Return "Ok"
|
||||
@@ -381,6 +432,7 @@ Public Class CurrMachWindowVM
|
||||
If m_CurrWaterjettingList.Count = 0 Then
|
||||
CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
m_CurrWaterjettingQualityList = New List(Of String)(CurrentMachine.Qualities)
|
||||
|
||||
ElseIf CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
||||
CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||
@@ -411,6 +463,7 @@ Public Class CurrMachWindowVM
|
||||
If m_CurrWaterjettingList.Count = 0 Then
|
||||
CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
End If
|
||||
m_CurrWaterjettingQualityList = New List(Of String)(CurrentMachine.Qualities)
|
||||
End If
|
||||
|
||||
' Nascondo la selezione dell'utensile ausiliario -- DA ELIMINARE? --
|
||||
@@ -459,11 +512,20 @@ Public Class CurrMachWindowVM
|
||||
|
||||
If CurrentMachine.bWaterJetting And CurrWaterjettingList.Count > 1 Then
|
||||
CurrWaterjetting_Visibility = Visibility.Visible
|
||||
If CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
SelCurrWaterjetting = CurrentMachine.sCurrWaterJetting
|
||||
' 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
|
||||
End If
|
||||
If CurrentMachine.sCurrWaterJettingQuality <> String.Empty Then
|
||||
SelCurrWaterjettingQuality = CurrentMachine.sCurrWaterJettingQuality
|
||||
End If
|
||||
CurrWaterjettingQuality_Visibility = Visibility.Visible
|
||||
Else
|
||||
CurrWaterjettingQuality_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
Else
|
||||
CurrWaterjetting_Visibility = Visibility.Collapsed
|
||||
CurrWaterjettingQuality_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
|
||||
' Con le nuove modifiche questa selezione dovrebbe scompaire definitivamente -- DA ELIMINARE? --
|
||||
@@ -595,26 +657,56 @@ Public Class CurrMachWindowVM
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, SysNotes)
|
||||
If SysNotes <> String.Empty Then
|
||||
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
||||
For Each Material In MachiningMaterials
|
||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
If Param.Count() < 2 Then Continue For
|
||||
Dim CurrMatId As String = String.Empty
|
||||
For Each Mat In CurrentMachine.Materials
|
||||
If Mat.sName = EstCalc.GetMaterialName Then
|
||||
CurrMatId = Mat.nId.ToString()
|
||||
Exit For
|
||||
|
||||
If CurrentMachine.bWaterJet And CurrentMachine.bFromDBWaterJet Then
|
||||
For Each Material As Object In MachiningMaterials
|
||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
If Param.Count() < 2 Then Continue For
|
||||
Dim CurrMatId As String = String.Empty
|
||||
Dim CurrMatSubId As String = String.Empty
|
||||
For Each Mat In CurrentMachine.Materials
|
||||
If Mat.sName = EstCalc.GetMaterialName Then
|
||||
CurrMatId = Mat.nId.ToString()
|
||||
CurrMatSubId = Mat.SubId.ToString()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||
If SubParam(0) = CurrentMachine.CurrMat.nId.ToString() AndAlso SubParam.Count > 1 AndAlso SubParam(1) = CurrentMachine.CurrMat.SubId.ToString() Then
|
||||
Dim MatMinH As Double = 0
|
||||
StringToDouble(Param(1), MatMinH)
|
||||
Dim MatMaxH As Double = 0
|
||||
StringToDouble(Param(2), MatMaxH)
|
||||
If EstCalc.GetRawHeight > MatMinH - EPS_SMALL And EstCalc.GetRawHeight < MatMaxH + EPS_SMALL Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If Param(0) = CurrMatId Then
|
||||
Dim MatMinH As Double = 0
|
||||
StringToDouble(Param(1), MatMinH)
|
||||
Dim MatMaxH As Double = 0
|
||||
StringToDouble(Param(2), MatMaxH)
|
||||
If EstCalc.GetRawHeight > MatMinH - EPS_SMALL And EstCalc.GetRawHeight < MatMaxH + EPS_SMALL Then
|
||||
Return True
|
||||
Else
|
||||
|
||||
For Each Material In MachiningMaterials
|
||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
If Param.Count() < 2 Then Continue For
|
||||
Dim CurrMatId As String = String.Empty
|
||||
For Each Mat In CurrentMachine.Materials
|
||||
If Mat.sName = EstCalc.GetMaterialName Then
|
||||
CurrMatId = Mat.nId.ToString()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Param(0) = CurrMatId Then
|
||||
Dim MatMinH As Double = 0
|
||||
StringToDouble(Param(1), MatMinH)
|
||||
Dim MatMaxH As Double = 0
|
||||
StringToDouble(Param(2), MatMaxH)
|
||||
If EstCalc.GetRawHeight > MatMinH - EPS_SMALL And EstCalc.GetRawHeight < MatMaxH + EPS_SMALL Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
@@ -624,6 +716,53 @@ Public Class CurrMachWindowVM
|
||||
End If
|
||||
End Function
|
||||
|
||||
'Private Function VerifyMatThickCompatibility() As Boolean
|
||||
' If Not IsNothing(m_CurrentMachine.CurrMat) Then
|
||||
' Dim SysNotes As String = String.Empty
|
||||
' EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, SysNotes)
|
||||
' If SysNotes <> String.Empty Then
|
||||
' Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
||||
' SysNotes = String.Empty
|
||||
' If m_CurrentMachine.bWaterJet Then
|
||||
' For Each Material As Object In MachiningMaterials
|
||||
' Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
' Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||
' If SubParam(0) = m_CurrentMachine.CurrMat.nId.ToString() AndAlso SubParam.Count > 1 AndAlso SubParam(1) = m_CurrentMachine.CurrMat.SubId.ToString() Then
|
||||
' Dim dRawHeight = GetRawHeight()
|
||||
' Dim MatMinH As Double = 0
|
||||
' StringToDouble(Param(1), MatMinH)
|
||||
' Dim MatMaxH As Double = 0
|
||||
' StringToDouble(Param(2), MatMaxH)
|
||||
' If dRawHeight > MatMinH - EPS_SMALL And dRawHeight < MatMaxH + EPS_SMALL Then
|
||||
' Return True
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
' Else
|
||||
' For Each Material As Object In MachiningMaterials
|
||||
' Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
' If Param(0) = m_CurrentMachine.CurrMat.nId.ToString() Then
|
||||
' Dim dRawHeight = GetRawHeight()
|
||||
' Dim MatMinH As Double = 0
|
||||
' StringToDouble(Param(1), MatMinH)
|
||||
' Dim MatMaxH As Double = 0
|
||||
' StringToDouble(Param(2), MatMaxH)
|
||||
' If dRawHeight > MatMinH - EPS_SMALL And dRawHeight < MatMaxH + EPS_SMALL Then
|
||||
' Return True
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
|
||||
' Return False
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
' Else
|
||||
' Return True
|
||||
' End If
|
||||
'End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -668,6 +668,9 @@ Friend Module CamAuto
|
||||
End If
|
||||
' Lo sposto dalla lavorazione al pezzo
|
||||
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
|
||||
|
||||
If nId = GDB_ID.NULL Then Return False
|
||||
|
||||
While nId <> GDB_ID.NULL
|
||||
EgtRelocateGlob(nId, nPartPvId)
|
||||
nId = EgtGetFirstInGroup(nMchPvId)
|
||||
|
||||
@@ -253,11 +253,13 @@
|
||||
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
||||
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
||||
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
||||
Public Const K_CURRWATERJETTINGQUALITY 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 S_SETUP As String = "SetUp"
|
||||
Public Const K_DEFAULT As String = "Default"
|
||||
|
||||
+122
-12
@@ -86,6 +86,9 @@ Public Module CurrentMachine
|
||||
Private m_bPolishingWheel As Boolean = False
|
||||
Private m_bWaterJet As Boolean = False
|
||||
|
||||
' Abilitazione DB WaterJet
|
||||
Private m_bFromDBWaterJet As Boolean = False
|
||||
|
||||
' Flag per visualizzazione TcPos, Testa/uscita e Note utente
|
||||
Private m_nShowToolChanger As Integer = 0 ' 0=no, 1=tutti utensili, 2=solo lame
|
||||
Private m_bShowHeadExit As Boolean = False
|
||||
@@ -123,6 +126,7 @@ Public Module CurrentMachine
|
||||
Private m_sCurrDripSawing As String = String.Empty
|
||||
Private m_sCurrDripDrilling As String = String.Empty
|
||||
Private m_sCurrWaterJetting As String = String.Empty
|
||||
Private m_sCurrWaterJettingQuality As String = String.Empty
|
||||
|
||||
' Spessore sottopezzo
|
||||
Private m_dAdditionalTable As Double = 0
|
||||
@@ -162,6 +166,9 @@ Public Module CurrentMachine
|
||||
' Lista dei materiali
|
||||
Private m_Materials As New ObservableCollection(Of Material)
|
||||
|
||||
' Lista delle qualità di lavorazioni disponibili nel WaterJet
|
||||
Private m_Qualities As New ObservableCollection(Of String)
|
||||
|
||||
' Massimo id della lista materiali nel file ini
|
||||
Private m_MaxIdMat As Integer = 0
|
||||
|
||||
@@ -559,6 +566,12 @@ Public Module CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bFromDBWaterJet As Boolean
|
||||
Get
|
||||
Return m_bFromDBWaterJet
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property ShowToolChanger As Integer
|
||||
Get
|
||||
Return m_nShowToolChanger
|
||||
@@ -828,6 +841,17 @@ Friend Property sCurrMillNoTip As String
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrWaterJettingQuality As String
|
||||
Get
|
||||
Return m_sCurrWaterJettingQuality
|
||||
End Get
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, value, sMachIniFile) Then
|
||||
m_sCurrWaterJettingQuality = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property WaterJettingActive As Boolean
|
||||
Get
|
||||
Return m_bWaterJetting AndAlso Not String.IsNullOrWhiteSpace(m_sCurrWaterJetting)
|
||||
@@ -1006,6 +1030,12 @@ Friend Property sCurrMillNoTip As String
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property Qualities As ObservableCollection(Of String)
|
||||
Get
|
||||
Return m_Qualities
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub AddMaterial(value As Material)
|
||||
For Each Material In Materials
|
||||
If Material.nId = value.nId Then
|
||||
@@ -1089,9 +1119,13 @@ Friend Property sCurrMillNoTip As String
|
||||
If Not IsNothing(value) Then
|
||||
Dim CurrMatId As String = value.nId.ToString
|
||||
Dim sKey As String = If(m_bOffice, K_CURROFFICEMATERIAL, K_CURRMATERIAL)
|
||||
WritePrivateProfileString(S_MATERIALS, sKey, CurrMatId, sMachIniFile)
|
||||
If bWaterJet And bFromDBWaterJet Then
|
||||
WritePrivateProfileString(S_MATERIALS, sKey, CurrMatId & "." & value.SubId, sMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MATERIALS, sKey, CurrMatId, sMachIniFile)
|
||||
End If
|
||||
m_CurrMat = value
|
||||
End If
|
||||
m_CurrMat = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -1200,6 +1234,8 @@ Friend Property sCurrMillNoTip As String
|
||||
m_bPolishingWheel = (GetPrivateProfileInt(S_TOOLS, K_POLISHINGWHEEL, 0, sMachIniFile) > 0) And bKeyPolish
|
||||
' waterjet
|
||||
m_bWaterJet = (GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachIniFile) > 0) And bKeyWJ
|
||||
' Leggo abilitazione DB WaterJet
|
||||
m_bFromDBWaterJet = (GetPrivateProfileInt(S_MATERIALS, K_FROMDBWATERJET, 0, sMachIniFile) > 0)
|
||||
' Leggo abilitazione visualizzazione TcPos e Head/exit
|
||||
m_nShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile)
|
||||
m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
|
||||
@@ -1272,6 +1308,8 @@ Friend Property sCurrMillNoTip As String
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
||||
' waterjetting
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, Nothing, m_sCurrWaterJetting, sMachIniFile)
|
||||
' waterjettingquality
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, Nothing, m_sCurrWaterJettingQuality, sMachIniFile)
|
||||
|
||||
' Leggo numero di portautensili
|
||||
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
||||
@@ -1330,24 +1368,80 @@ Friend Property sCurrMillNoTip As String
|
||||
' Leggo la lista dei materiali
|
||||
Dim Material As Material = Nothing
|
||||
Dim nIndex As Integer = 1
|
||||
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
||||
m_Materials.Add(Material)
|
||||
nIndex += 1
|
||||
End While
|
||||
If m_bWaterJet And m_bFromDBWaterJet Then
|
||||
LoadWJMaterial(True)
|
||||
Else
|
||||
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
||||
m_Materials.Add(Material)
|
||||
nIndex += 1
|
||||
End While
|
||||
End If
|
||||
' Salvo massimo indice a cui sono arrivato per usarlo quando devo aggiungere nuovi elementi alla lista
|
||||
m_MaxIdMat = nIndex - 1
|
||||
|
||||
' Leggo materiale correntemente attivo
|
||||
Dim sCurrMatId As String = String.Empty
|
||||
Dim sKey As String = If(m_bOffice, K_CURROFFICEMATERIAL, K_CURRMATERIAL)
|
||||
Dim CurrMatId As Integer = GetPrivateProfileInt(S_MATERIALS, sKey, 0, sMachIniFile)
|
||||
For Each Material In Materials
|
||||
If Material.nId = CurrMatId Then
|
||||
m_CurrMat = Material
|
||||
Exit For
|
||||
EgtUILib.GetPrivateProfileString(S_MATERIALS, sKey, "0", sCurrMatId, sMachIniFile)
|
||||
If bWaterJet And bFromDBWaterJet Then
|
||||
Dim sCurrMatIds As String()
|
||||
sCurrMatIds = sCurrMatId.Split("."c)
|
||||
If sCurrMatIds.Length > 1 Then
|
||||
Dim nCurrMatId As Integer
|
||||
Dim nCurrSubMatId As Integer
|
||||
If Not Integer.TryParse(sCurrMatIds(0), nCurrMatId) Then nCurrMatId = 0
|
||||
If Not Integer.TryParse(sCurrMatIds(1), nCurrSubMatId) Then nCurrSubMatId = 0
|
||||
For Each Material In Materials
|
||||
If Material.nId = nCurrMatId AndAlso Material.SubId = nCurrSubMatId Then
|
||||
m_CurrMat = Material
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
Dim nCurrMatId As Integer
|
||||
If Not Integer.TryParse(sCurrMatId, nCurrMatId) Then nCurrMatId = 0
|
||||
For Each Material In Materials
|
||||
If Material.nId = nCurrMatId Then
|
||||
m_CurrMat = Material
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' Leggo se la macchina ha il tastatore dello spessore lastra
|
||||
m_HasRawProbe = (GetPrivateProfileInt(S_MACH_PROBING, K_ENABLERAWPROBE, 1, sMachIniFile) <> 0)
|
||||
|
||||
' Se macchina ha Waterjet mostro il bottone per DB Waterjet
|
||||
OmagOFFICEMap.refMachinePanelVM.NotifyPropertyChanged(NameOf(OmagOFFICEMap.refMachinePanelVM.WjDb_Visibility))
|
||||
End Sub
|
||||
|
||||
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||
Dim TempCurrMat As Material = CurrMat
|
||||
' Svuoto l'attuale lista di materiali e delle qualità
|
||||
m_Materials.Clear()
|
||||
m_Qualities.Clear()
|
||||
' Leggo valori da file .data e li carico nelle proprietà
|
||||
Dim sFilePath As String = sMachDir & EgtWPFLib5.WaterjetDbWindowVM.WATERJETDB_PATH
|
||||
WjMaterialList = EgtWPFLib5.WaterjetDbWindowVM.LoadWjMaterials(sFilePath)
|
||||
' definisco la lista delle qualità
|
||||
m_Qualities.Add("")
|
||||
m_Qualities.Add("Q1")
|
||||
m_Qualities.Add("Q2")
|
||||
m_Qualities.Add("Q3")
|
||||
m_Qualities.Add("Q4")
|
||||
m_Qualities.Add("Q5")
|
||||
m_Qualities.Add("QExtra")
|
||||
' costruisco la lista
|
||||
Dim i As Integer = 0
|
||||
Dim sName As String = String.Empty
|
||||
For i = 0 To WjMaterialList.Count - 1
|
||||
sName = WjMaterialList(i).Name
|
||||
Dim j As Integer = 0
|
||||
For j = 0 To WjMaterialList(i).SubMaterialList.Count - 1
|
||||
m_Materials.Add(New Material(i + 1, sName & "." & WjMaterialList(i).SubMaterialList(j).Name, j + 1))
|
||||
Next
|
||||
Next
|
||||
If Not bIsStart Then CurrMat = TempCurrMat
|
||||
End Sub
|
||||
|
||||
Friend Function IsVacuumMovePossible() As Boolean
|
||||
@@ -1456,6 +1550,7 @@ Public Class Material
|
||||
|
||||
Private m_nId As Integer
|
||||
Private m_sName As String
|
||||
Private m_SubId As Integer = 0
|
||||
|
||||
Public ReadOnly Property nId As Integer
|
||||
Get
|
||||
@@ -1472,6 +1567,15 @@ Public Class Material
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SubId As Integer
|
||||
Get
|
||||
Return m_SubId
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SubId = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sName As String, MaterialList As ObservableCollection(Of Material))
|
||||
Dim nMaxId As Integer = 0
|
||||
For Each Material In MaterialList
|
||||
@@ -1488,4 +1592,10 @@ Public Class Material
|
||||
m_sName = sName
|
||||
End Sub
|
||||
|
||||
Sub New(nId As Integer, sName As String, nSubId As Integer)
|
||||
m_nId = nId
|
||||
m_sName = sName
|
||||
m_SubId = nSubId
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+27
-15
@@ -1,13 +1,13 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2015-2017
|
||||
' EgalTech 2015-2021
|
||||
'----------------------------------------------------------------------------
|
||||
' File : GenPhoto.vb Data : 12.04.17 Versione : 1.8d1
|
||||
' File : GenPhoto.vb Data : 15.11.21 Versione : 2.3k1
|
||||
' Contenuto : Modulo gestione fotografie.
|
||||
' Ogni gruppo di lavoro può avere una sua foto della lastra.
|
||||
'
|
||||
'
|
||||
' Modifiche : 12.04.17 DS Creazione modulo.
|
||||
'
|
||||
' 15.11.21 PS Correzioni per scalatura foto da CameraMng senza sovratavola.
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
@@ -35,12 +35,12 @@ Module EstPhoto
|
||||
If dThick > EPS_SMALL Then
|
||||
OmagOFFICEMap.refRawPartTabVM.Height = DoubleToString( dThick, 3)
|
||||
End If
|
||||
' Altezza eventuale tavola aggiuntiva
|
||||
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
|
||||
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
||||
' Aggiusto dati per spessore grezzo
|
||||
If Math.Abs(EstCalc.GetRawHeight() + dAddTable) > EPS_SMALL Then
|
||||
' Coefficiente di scalatura
|
||||
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptOri.z)
|
||||
' Coefficiente di scalatura (non va considerata la sovratavola)
|
||||
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight()) / (ptCen.z - ptOri.z)
|
||||
dMMxPixel *= dFsca
|
||||
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
|
||||
ptOri.y = ptCen.y + (ptOri.y - ptCen.y) * dFsca
|
||||
@@ -67,7 +67,11 @@ Module EstPhoto
|
||||
End If
|
||||
EgtSetLevel(nPhGrpId, GDB_LV.SYSTEM)
|
||||
' Carico la fotografia
|
||||
Return EgtAddPhoto(GetPhotoName(), sPath, ptOri, ptCen, dMMxPixel, nPhGrpId, b3Tab.Min(), b3Tab.Max()) <> GDB_ID.NULL
|
||||
Dim nPhotoId As Integer = EgtAddPhoto(GetPhotoName(), sPath, ptOri, ptCen, dMMxPixel, nPhGrpId, b3Tab.Min(), b3Tab.Max())
|
||||
If nPhotoId = GDB_ID.NULL Then Return False
|
||||
' Salvo spessore sovratavola usato per posizionamento in Z
|
||||
EgtSetInfo( nPhotoId, "OvTab", dAddTable)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function LoadContour(sPath As String) As Boolean
|
||||
@@ -92,12 +96,12 @@ Module EstPhoto
|
||||
Dim nPixelX As Integer = 0
|
||||
Dim nPixelY As Integer = 0
|
||||
If Not EgtGetPhotoImagePixels(GetPhoto(), nPixelX, nPixelY) Then Return False
|
||||
' Altezza eventuale tavola aggiuntiva
|
||||
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
|
||||
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
||||
' Aggiusto dati per spessore grezzo
|
||||
If Math.Abs(EstCalc.GetRawHeight() + dAddTable) > EPS_SMALL Then
|
||||
' Coefficiente di scalatura
|
||||
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptOri.z)
|
||||
' Coefficiente di scalatura (non va considerata la sovratavola)
|
||||
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight()) / (ptCen.z - ptOri.z)
|
||||
dMMxPixel *= dFsca
|
||||
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
|
||||
ptOri.y = ptCen.y + (ptOri.y - ptCen.y) * dFsca
|
||||
@@ -385,10 +389,13 @@ Module EstPhoto
|
||||
' Porto i punti in locale
|
||||
ptOri.ToLoc(New Frame3d(ptTab))
|
||||
ptCen.ToLoc(New Frame3d(ptTab))
|
||||
' Altezza eventuale tavola aggiuntiva
|
||||
' Altezza della eventuale tavola aggiuntiva originaria
|
||||
Dim dOrigAddTable As Double = 0
|
||||
EgtGetInfo( nPhotoId, "OvTab", dOrigAddTable)
|
||||
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
|
||||
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
||||
' Aggiusto dati per spessore grezzo (Coefficiente di scalatura)
|
||||
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptOri.z)
|
||||
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight()) / (ptCen.z - ptOri.z + dOrigAddTable)
|
||||
dDimX *= dFsca
|
||||
dDimY *= dFsca
|
||||
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
|
||||
@@ -426,6 +433,8 @@ Module EstPhoto
|
||||
EgtSetInfo(nNewPhotoId, "OffsX", dOffsetX)
|
||||
EgtSetInfo(nNewPhotoId, "OffsY", dOffsetY)
|
||||
EgtSetInfo(nNewPhotoId, "Rot", dRot)
|
||||
' Salvo sovratavola attuale
|
||||
EgtSetInfo( nNewPhotoId, "OvTab", dAddTable)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -482,17 +491,20 @@ Module EstPhoto
|
||||
' Recupero origine della tavola
|
||||
Dim ptTab As Point3d
|
||||
If Not EgtGetTableRef(1, ptTab) Then Return False
|
||||
' Altezza eventuale tavola aggiuntiva
|
||||
' Altezza della eventuale tavola aggiuntiva originaria
|
||||
Dim dOrigAddTable As Double = 0
|
||||
EgtGetInfo( nPhotoId, "OvTab", dOrigAddTable)
|
||||
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
|
||||
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
||||
' Recupero inizio contorno
|
||||
Dim ptStart As Point3d
|
||||
EgtStartPoint(nCrvId, GDB_ID.ROOT, ptStart)
|
||||
' Calcolo coefficiente di scalatura
|
||||
Dim dFsca As Double = (ptCen.z - ptTab.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptStart.z)
|
||||
Dim dFsca As Double = (ptCen.z - ptTab.z - EstCalc.GetRawHeight()) / (ptCen.z - ptStart.z + dOrigAddTable)
|
||||
' Scalo opportunamente
|
||||
EgtScale(nCrvId, New Frame3d(ptCen), dFsca, dFsca, 1, GDB_RT.GLOB)
|
||||
' Sposto in Z
|
||||
Dim vtMove As New Vector3d(0, 0, ptTab.z + EstCalc.GetRawHeight() + dAddTable - ptStart.z)
|
||||
Dim vtMove As New Vector3d(0, 0, ptTab.z + EstCalc.GetRawHeight() + CurrentMachine.dAdditionalTable - ptStart.z)
|
||||
EgtMove(nCrvId, vtMove, GDB_RT.GLOB)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -160,6 +160,17 @@ Public Module SplitAuto
|
||||
End Function
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
' calcolo il numero di tipi di lavorazioni
|
||||
Friend Sub CountMachiningType(MachSplit As SplitMach, ByRef nCountSawing As Integer, ByRef nCountWaterjetting As Integer, ByRef nCountOtherMachining As Integer)
|
||||
If MachSplit.m_nType = MCH_OY.SAWING Then
|
||||
nCountSawing += 1
|
||||
ElseIf MachSplit.m_nType = MCH_OY.WATERJETTING Then
|
||||
nCountWaterjetting += 1
|
||||
Else
|
||||
nCountOtherMachining += 1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub ColorMachining(MachSplit As SplitMach, Optional bReset As Boolean = False)
|
||||
EgtDisableModified()
|
||||
' Assegno stato
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
<!--Prima Colonna quarta riga - Lista Materiali-->
|
||||
<GroupBox Header="{Binding MaterialsMsg}" Grid.Column="0"
|
||||
Grid.Row="3" Grid.RowSpan="5">
|
||||
Grid.Row="3" Grid.RowSpan="5" Visibility="{Binding Materials_Visibility}">
|
||||
|
||||
<DockPanel>
|
||||
|
||||
@@ -91,12 +91,31 @@
|
||||
Margin="2.5,0,0,0"/>
|
||||
</UniformGrid>
|
||||
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding NewMatName}"
|
||||
<!--<EgtWPFLib5:EgtTextBox Text="{Binding NewMatName}"
|
||||
DockPanel.Dock="Bottom" Width="240"
|
||||
Visibility="{Binding NewMatName_Visibility}"
|
||||
Margin="0,0,0,5"/>
|
||||
|
||||
<ListBox ItemsSource="{Binding MaterialList}"
|
||||
Margin="0,0,0,5"/>-->
|
||||
<Grid DockPanel.Dock="Bottom" Visibility="{Binding NewMatName_Visibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding NewMatName}"
|
||||
DockPanel.Dock="Bottom"
|
||||
Margin="0,0,0,5"/>
|
||||
<Button Content="{Binding OkMsg}" Grid.Column="1"
|
||||
Command="{Binding OkCommand}"
|
||||
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>
|
||||
|
||||
<ListBox ItemsSource="{Binding MaterialList}"
|
||||
SelectedItem="{Binding SelMaterial}"
|
||||
DisplayMemberPath="sName"
|
||||
Grid.RowSpan="2"
|
||||
@@ -107,7 +126,7 @@
|
||||
</GroupBox>
|
||||
|
||||
<!--Parametri taglio lama-->
|
||||
<GroupBox Header="{Binding SawParamMsg}">
|
||||
<GroupBox Header="{Binding SawParamMsg}" Visibility="{Binding SawParam_Visibility}">
|
||||
<UniformGrid Columns="2" >
|
||||
|
||||
<TextBlock Text="{Binding CutExtraLenMsg}"
|
||||
@@ -152,7 +171,7 @@
|
||||
<GroupBox Header="{Binding MillingParamMsg}" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2">
|
||||
<UniformGrid Rows="3">
|
||||
|
||||
<Grid>
|
||||
<Grid Visibility="{Binding MillingParam_Visibility}">
|
||||
<TextBlock Text="{Binding CornerCutsMsg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<CheckBox IsChecked="{Binding CornerCuts}"
|
||||
@@ -164,7 +183,7 @@
|
||||
<CheckBox IsChecked="{Binding InternalCuts}"
|
||||
Style="{StaticResource OptionCheckBox}"/>
|
||||
</Grid>
|
||||
<UniformGrid Columns="2">
|
||||
<UniformGrid Columns="2" Visibility="{Binding MillingParam_Visibility}">
|
||||
<TextBlock Text="{Binding ShortMsg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding ShortCut}"/>
|
||||
@@ -174,7 +193,7 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Nesting-->
|
||||
<!--Nesting-->
|
||||
<GroupBox Header="{Binding NestingParamMsg}" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2">
|
||||
<UniformGrid Columns="2" >
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Public Class MachOptionWindowVM
|
||||
|
||||
Public Property HolesOffset As String
|
||||
Get
|
||||
Return LenToString(CurrentMachine.dHolesOffset, -2)
|
||||
Return LenToString(CurrentMachine.dHolesOffset, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dHolesOffset As Double = 0
|
||||
@@ -45,7 +45,7 @@ Public Class MachOptionWindowVM
|
||||
|
||||
Public Property HolesOverlap As String
|
||||
Get
|
||||
Return LenToString(CurrentMachine.dHolesOverlap, -2)
|
||||
Return LenToString(CurrentMachine.dHolesOverlap, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dHolesOverlap As Double = 0
|
||||
@@ -57,7 +57,7 @@ Public Class MachOptionWindowVM
|
||||
|
||||
Public Property HolesTolerance As String
|
||||
Get
|
||||
Return LenToString(CurrentMachine.dHolesTolerance, -2)
|
||||
Return LenToString(CurrentMachine.dHolesTolerance, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dHolesTolerance As Double = 0
|
||||
@@ -82,7 +82,7 @@ Public Class MachOptionWindowVM
|
||||
|
||||
Public Property CutExtraLen As String
|
||||
Get
|
||||
Return LenToString(CurrentMachine.dCutExtraLen, -2)
|
||||
Return LenToString(CurrentMachine.dCutExtraLen, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dCutExtraLen As Double = 0
|
||||
@@ -94,7 +94,7 @@ Public Class MachOptionWindowVM
|
||||
|
||||
Public Property AngleCutExtraLen As String
|
||||
Get
|
||||
Return LenToString(CurrentMachine.dAngleCutExtraLen, -2)
|
||||
Return LenToString(CurrentMachine.dAngleCutExtraLen, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dAngleCutExtraLen As Double = 0
|
||||
@@ -106,7 +106,7 @@ Public Class MachOptionWindowVM
|
||||
|
||||
Public Property ExtArcMinRad As String
|
||||
Get
|
||||
Return LenToString(CurrentMachine.dExtArcMinRad, -2)
|
||||
Return LenToString(CurrentMachine.dExtArcMinRad, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dExtArcMinRad As Double = 0
|
||||
@@ -118,7 +118,7 @@ Public Class MachOptionWindowVM
|
||||
|
||||
Public Property IntArcMaxSideAng As String
|
||||
Get
|
||||
Return DoubleToString(CurrentMachine.dIntArcMaxSideAng, -2)
|
||||
Return DoubleToString(CurrentMachine.dIntArcMaxSideAng, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dIntArcMaxSideAng As Double = 0
|
||||
@@ -144,13 +144,24 @@ Public Class MachOptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SawParam_Visibility As Visibility
|
||||
Get
|
||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
Return Visibility.Hidden
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Saw Param
|
||||
|
||||
#Region "Machine Param"
|
||||
|
||||
Public Property SafeZ As String
|
||||
Get
|
||||
Return LenToString(CurrentMachine.dSafeZ, -2)
|
||||
Return LenToString(CurrentMachine.dSafeZ, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dSafeZ As Double = 0
|
||||
@@ -184,7 +195,7 @@ Public Class MachOptionWindowVM
|
||||
|
||||
Public Property ShortCut As String
|
||||
Get
|
||||
Return LenToString(CurrentMachine.dShortCut, -2)
|
||||
Return LenToString(CurrentMachine.dShortCut, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dShortCut As Double = 0
|
||||
@@ -194,6 +205,16 @@ Public Class MachOptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MillingParam_Visibility As Visibility
|
||||
Get
|
||||
If bWaterJet Then
|
||||
Return Visibility.Hidden
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Milling Param
|
||||
|
||||
#Region "Nesting Param"
|
||||
@@ -264,7 +285,7 @@ Public Class MachOptionWindowVM
|
||||
|
||||
Public Property AdditionalTable As String
|
||||
Get
|
||||
Return LenToString(CurrentMachine.dAdditionalTable, -2)
|
||||
Return LenToString(CurrentMachine.dAdditionalTable, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dAdditionalTable As Double = 0
|
||||
@@ -333,22 +354,41 @@ Public Class MachOptionWindowVM
|
||||
Set(value As String)
|
||||
m_NewMatName = value
|
||||
' Verifico che il nome non sia vuoto
|
||||
If Not String.IsNullOrWhiteSpace(m_NewMatName) Then
|
||||
' Verifico che il nome non sia già utilizzato
|
||||
Dim bNameExist As Boolean = False
|
||||
For Each Material In CurrentMachine.Materials
|
||||
If Material.sName = m_NewMatName Then
|
||||
bNameExist = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bNameExist Then
|
||||
CurrentMachine.AddMaterial(New Material(m_NewMatName, CurrentMachine.Materials))
|
||||
AddNewMaterial()
|
||||
NotifyPropertyChanged("EnableOkNewMat")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Function AddNewMaterial() As Boolean
|
||||
If Not String.IsNullOrWhiteSpace(m_NewMatName) Then
|
||||
' Verifico che il nome non sia già utilizzato
|
||||
Dim bNameExist As Boolean = False
|
||||
For Each Material In MaterialList
|
||||
If Material.sName = m_NewMatName Then
|
||||
bNameExist = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bNameExist Then
|
||||
'm_MaterialList.Add(m_NewMatName)
|
||||
m_EnableOkNewMat = True
|
||||
Return True
|
||||
End If
|
||||
' Nascondo textbox per il nome
|
||||
NewMatName_Visibility = Visibility.Collapsed
|
||||
m_NewMatName = String.Empty
|
||||
End If
|
||||
' ' Nascondo textbox per il nome
|
||||
' NewMatName_Visibility = Visibility.Collapsed
|
||||
' m_NewMatName = String.Empty
|
||||
m_EnableOkNewMat = False
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private m_EnableOkNewMat As Boolean = False
|
||||
Public Property EnableOkNewMat As Boolean
|
||||
Get
|
||||
Return m_EnableOkNewMat
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EnableOkNewMat = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -363,11 +403,19 @@ Public Class MachOptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Materials_Visibility As Visibility
|
||||
Get
|
||||
Return If(CurrentMachine.bWaterJet, Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Material
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdNewMat As ICommand
|
||||
Private m_cmdRemoveMat As ICommand
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdCanel As ICommand
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
@@ -448,7 +496,11 @@ Public Class MachOptionWindowVM
|
||||
End Property
|
||||
Public ReadOnly Property MillingParamMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_ALARMSPAGEUC + 29)
|
||||
If bWaterJet Then
|
||||
Return EgtMsg(91058)
|
||||
Else
|
||||
Return EgtMsg(MSG_ALARMSPAGEUC + 29)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property CornerCutsMsg As String
|
||||
@@ -521,6 +573,19 @@ Public Class MachOptionWindowVM
|
||||
Return EgtMsg(91065)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OkMsg As String
|
||||
Get
|
||||
Return "Ok"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CancelMsg As String
|
||||
Get
|
||||
Return "Cancel"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "ToolTip"
|
||||
@@ -622,6 +687,64 @@ Public Class MachOptionWindowVM
|
||||
|
||||
#End Region ' RemoveMatCommand
|
||||
|
||||
#Region "OkCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property OkCommand As ICommand
|
||||
Get
|
||||
If m_cmdOk Is Nothing Then
|
||||
m_cmdOk = New Command(AddressOf OkMat)
|
||||
End If
|
||||
Return m_cmdOk
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub OkMat(ByVal param As Object)
|
||||
' aggiungo il materiale alla lista
|
||||
Dim objNewMat As New Material(m_NewMatName, CurrentMachine.Materials)
|
||||
If Not IsNothing(objNewMat) Then
|
||||
CurrentMachine.Materials.Add(objNewMat)
|
||||
End If
|
||||
' Nascondo textbox per il nome
|
||||
NewMatName_Visibility = Visibility.Collapsed
|
||||
m_NewMatName = String.Empty
|
||||
NotifyPropertyChanged("NewMatName")
|
||||
End Sub
|
||||
|
||||
#End Region ' OkCommand
|
||||
|
||||
#Region "CancelCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CamcelCommand As ICommand
|
||||
Get
|
||||
If m_cmdCanel Is Nothing Then
|
||||
m_cmdCanel = New Command(AddressOf CancelMat)
|
||||
End If
|
||||
Return m_cmdCanel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub CancelMat(ByVal param As Object)
|
||||
' Nascondo textbox per il nome
|
||||
NewMatName_Visibility = Visibility.Collapsed
|
||||
m_NewMatName = String.Empty
|
||||
NotifyPropertyChanged("NewMatName")
|
||||
End Sub
|
||||
|
||||
#End Region ' CancelCommand
|
||||
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -22,5 +22,7 @@
|
||||
<Button Command="{Binding MachOptionsCommand}" ToolTip="{Binding OptionsToolTip}">
|
||||
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
||||
</Button>
|
||||
<Button Command="{Binding WaterjetDbCommand}" ToolTip="{Binding WaterjetDbToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}" Content="{Binding WaterjetDbMsg}" Visibility="{Binding WjDb_Visibility}"/>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -22,6 +22,12 @@ Public Class MyMachinePanelVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property WjDb_Visibility As Visibility
|
||||
Get
|
||||
Return If(CurrentMachine.bWaterJet And CurrentMachine.bFromDBWaterJet, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property ToolDBMsg As String
|
||||
@@ -39,6 +45,11 @@ Public Class MyMachinePanelVM
|
||||
Return EgtMsg(MSG_ALARMSPAGEUC + 33)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property WaterjetDbMsg As String
|
||||
Get
|
||||
Return "WJ" 'EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
@@ -59,6 +70,11 @@ Public Class MyMachinePanelVM
|
||||
Return "SetUp"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property WaterjetDbToolTip As String
|
||||
Get
|
||||
Return "Waterjet DB"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
@@ -67,6 +83,7 @@ Public Class MyMachinePanelVM
|
||||
Private m_cmdMachDb As ICommand
|
||||
Private m_cmdSetUp As ICommand
|
||||
Private m_cmdMachOptions As ICommand
|
||||
Private m_cmdWaterjetDb As ICommand
|
||||
|
||||
#End Region 'FIELDS & PROPERTIES
|
||||
|
||||
@@ -300,6 +317,33 @@ Public Class MyMachinePanelVM
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
End Sub
|
||||
|
||||
#Region "WaterjetDbCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property WaterjetDbCommand As ICommand
|
||||
Get
|
||||
If m_cmdWaterjetDb Is Nothing Then
|
||||
m_cmdWaterjetDb = New Command(AddressOf WaterjetDb)
|
||||
End If
|
||||
Return m_cmdWaterjetDb
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 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))
|
||||
WaterjetDbWindow.Height = 546
|
||||
WaterjetDbWindow.Width = 846
|
||||
WaterjetDbWindow.ShowDialog()
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
End Sub
|
||||
|
||||
#End Region ' SpeedDbCommand
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -195,8 +195,8 @@ Public Class MainWindowM
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2309, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2309, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2311, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2311, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
|
||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.9.3")>
|
||||
<Assembly: AssemblyFileVersion("2.3.9.3")>
|
||||
<Assembly: AssemblyVersion("2.3.11.2")>
|
||||
<Assembly: AssemblyFileVersion("2.3.11.2")>
|
||||
|
||||
|
||||
@@ -285,6 +285,7 @@ Public Class MySceneHostVM
|
||||
EgtOutLog( "Slab image not found :" & sOriPath)
|
||||
End Try
|
||||
EgtSetName(nPhotoId, PHOTO_NAME)
|
||||
EgtChangePhotoCenterAsFlatScan( nPhotoId)
|
||||
End If
|
||||
' Elimino gli altri gruppi di lavorazioni
|
||||
For Each nMGrpId As Integer In vMchGrps
|
||||
@@ -743,6 +744,7 @@ Public Class MySceneHostVM
|
||||
Case OptionPanelVM.Tabs.NESTING
|
||||
OmagOFFICEMap.refNestingTabVM.OnMouseMoveScene(sender, e)
|
||||
Case OptionPanelVM.Tabs.MACHINING
|
||||
OmagOFFICEMap.refSplitModeVM.OnMyMouseMoveScene(sender, e)
|
||||
Case OptionPanelVM.Tabs.SIMUL
|
||||
End Select
|
||||
End Sub
|
||||
@@ -755,6 +757,7 @@ Public Class MySceneHostVM
|
||||
Case OptionPanelVM.Tabs.NESTING
|
||||
OmagOFFICEMap.refNestingTabVM.OnMouseUpScene(sender, e)
|
||||
Case OptionPanelVM.Tabs.MACHINING
|
||||
OmagOFFICEMap.refSplitModeVM.OnMyMouseUpScene(sender, e)
|
||||
Case OptionPanelVM.Tabs.SIMUL
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -151,6 +151,10 @@
|
||||
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
|
||||
<DependentUpon>AboutBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AlzAndFront\AlzAndFront.xaml.vb">
|
||||
<DependentUpon>AlzAndFront.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AlzAndFront\AlzAndFront.vb" />
|
||||
<Compile Include="CompoCsvTrfDataWindow\CompoCsvDataWindowV.xaml.vb">
|
||||
<DependentUpon>CompoCsvDataWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -333,6 +337,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="AlzAndFront\AlzAndFront.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="CompoCsvTrfDataWindow\CompoCsvDataWindowV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -322,6 +322,8 @@ Public Class MachiningTabVM
|
||||
Friend Sub OnMouseDownScene(sender As Object, e As Windows.Forms.MouseEventArgs)
|
||||
If m_MachiningMode = MachiningModeOpt.MOVERAWPART Then
|
||||
OmagOFFICEMap.refMoveRawModeVM.OnMouseDownScene(sender, e)
|
||||
ElseIf m_MachiningMode = MachiningModeOpt.SPLIT Then
|
||||
OmagOFFICEMap.refSplitModeVM.OnMouseDownScene(sender, e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -71,14 +71,17 @@
|
||||
<Button Content="{Binding CutMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutCommand}"
|
||||
Visibility="{Binding CutBtnVisibility}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<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>
|
||||
@@ -94,10 +97,12 @@
|
||||
<Button Content="{Binding AllExtendMsg}" Grid.Column="1"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllExtendCommand}"
|
||||
Visibility="{Binding AllExtendBtnVisibility}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Content="{Binding AllReduceMsg}" Grid.Column="2"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllReduceCommand}"
|
||||
Visibility="{Binding AllReduceBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
</Grid>
|
||||
@@ -115,14 +120,17 @@
|
||||
<Button Content="{Binding OutCenStartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding OutCenStartCommand}"
|
||||
Visibility="{Binding OutCenStartBtnVisibility}"
|
||||
Margin="0,0,2.5,0" Padding="0"/>
|
||||
<Button Content="{Binding AllOutStartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllOutStartCommand}"
|
||||
Visibility="{Binding AllOutStartBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<Button Content="{Binding AllCenStartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllCenStartCommand}"
|
||||
Visibility="{Binding AllCenStartBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
</UniformGrid>
|
||||
@@ -132,14 +140,17 @@
|
||||
<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>
|
||||
@@ -159,6 +170,7 @@
|
||||
<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>
|
||||
@@ -174,6 +186,7 @@
|
||||
<Button Content="{Binding InvertMsg}" Grid.Column="0"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding InvertCommand}"
|
||||
Visibility="{Binding InvertBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
@@ -16,6 +16,25 @@ Public Class SplitModeVM
|
||||
Private m_CurrLastInd As Integer = -1
|
||||
Private m_SelectedItemsList As New ObservableCollection(Of NameIdLsBxItem)
|
||||
|
||||
' numero di lavorazioni di tipo lama
|
||||
Private m_nCountSawing As Integer = 0
|
||||
' numero di lavprazioni di tipo waterjet
|
||||
Private m_nCountWaterjetting As Integer = 0
|
||||
' altri tipi di lavorazioni (Foro/Fresa)
|
||||
Private m_nCountOtherMachining As Integer = 0
|
||||
' verifico che le lavorazioni selezionate siano omogenee (con lo stesso utensile)
|
||||
Private m_bAreHomogeneous As Boolean = False
|
||||
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Drag
|
||||
Private m_nDragInd As Integer = -1
|
||||
Private m_nDragType As Integer = 0 '0=niente, 1=attacco, 2=uscita
|
||||
Private m_ptDragPrev As Point3d
|
||||
Private m_bDragging As Boolean = False
|
||||
' Selected cut
|
||||
Private m_nSelected As Integer = GDB_ID.NULL
|
||||
|
||||
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
|
||||
Public ReadOnly Property ItemList As ObservableCollection(Of NameIdLsBxItem)
|
||||
Get
|
||||
@@ -45,6 +64,149 @@ Public Class SplitModeVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CutBtnVisibility As Visibility
|
||||
Public Property CutBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_CutBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_CutBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(CutBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CutStartBtnVisibility As Visibility
|
||||
Public Property CutStartBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_CutStartBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_CutStartBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(CutStartBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CutEndBtnVisibility As Visibility
|
||||
Public Property CutEndBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_CutEndBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_CutEndBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(CutEndBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_OutCenStartBtnVisibility As Visibility
|
||||
Public Property OutCenStartBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_OutCenStartBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_OutCenStartBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(OutCenStartBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_OutCenEndBtnVisibility As Visibility
|
||||
Public Property OutCenEndBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_OutCenEndBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_OutCenEndBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(OutCenEndBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_InvertBtnVisibility As Visibility
|
||||
Public Property InvertBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_InvertBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_InvertBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(InvertBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_PauseBtnVisibility As Visibility
|
||||
Public Property PauseBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_PauseBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_PauseBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(PauseBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_AllOutStartBtnVisibility As Visibility
|
||||
Public Property AllOutStartBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_AllOutStartBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_AllOutStartBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(AllOutStartBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_AllCenStartBtnVisibility As Visibility
|
||||
Public Property AllCenStartBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_AllCenStartBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_AllCenStartBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(AllCenStartBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_AllOutEndBtnVisibility As Visibility
|
||||
Public Property AllOutEndBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_AllOutEndBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_AllOutEndBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(AllOutEndBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_AllCenEndBtnVisibility As Visibility
|
||||
Public Property AllCenEndBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_AllCenEndBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_AllCenEndBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(AllCenEndBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_AllExtendBtnVisibility As Visibility
|
||||
Public Property AllExtendBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_AllExtendBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_AllExtendBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(AllExtendBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_AllReduceBtnVisibility As Visibility
|
||||
Public Property AllReduceBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_AllReduceBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_AllReduceBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(AllReduceBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property OnOffMsg As String
|
||||
@@ -193,6 +355,10 @@ Public Class SplitModeVM
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Function InitSplitRaw() As Boolean
|
||||
m_bActive = True
|
||||
'm_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
' Nascondo eventuali pezzi in parcheggio
|
||||
EstCalc.HideParkedParts()
|
||||
' Nascondo eventuale contorno da foto
|
||||
@@ -207,7 +373,7 @@ Public Class SplitModeVM
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.IsShow Then
|
||||
If CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||
If SortAllMachinings() Then EstCalc.SetOrderMachiningFlag()
|
||||
If CurrentMachine.WaterJettingActive Then
|
||||
If CurrentMachine.WaterJettingActive Then
|
||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||
If bModif Then OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(90321), 3, MSG_TYPE.WARNING) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||
End If
|
||||
@@ -225,12 +391,18 @@ Public Class SplitModeVM
|
||||
ShowOnePhaseMachiningPreview(m_nCurrPhase)
|
||||
' Preparo la lista delle lavorazioni
|
||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||
' azzero i contatori delle lavorazioni
|
||||
m_nCountSawing = 0
|
||||
m_nCountWaterjetting = 0
|
||||
m_nCountOtherMachining = 0
|
||||
' Aggiorno visualizzazione delle lavorazioni
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
' sistemo colore
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
' assegno numerazione
|
||||
NumberDirectionMachining(nI)
|
||||
' conto il numero di tipi di lavorazioni
|
||||
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||
Next
|
||||
' Preparo la lista degli Item
|
||||
ShowMachiningList()
|
||||
@@ -249,6 +421,7 @@ Public Class SplitModeVM
|
||||
End Function
|
||||
|
||||
Friend Function ExitSplitRaw(Optional bTrueExit As Boolean = True) As Boolean
|
||||
m_bActive = False
|
||||
' Rimuovo evidenziazione e numeri
|
||||
RemoveMarkAndNumbers()
|
||||
' Ripristino colori lavorazioni
|
||||
@@ -394,8 +567,14 @@ Public Class SplitModeVM
|
||||
HideAllMachinings()
|
||||
' Preparo la lista delle lavorazioni e le disabilito
|
||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||
' azzero i contatori delle lavorazioni
|
||||
m_nCountSawing = 0
|
||||
m_nCountWaterjetting = 0
|
||||
m_nCountOtherMachining = 0
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
m_MachiningList(nI).m_bEnabled = False
|
||||
' conto il numero di tipi di lavorazioni
|
||||
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||
Next
|
||||
' Aggiorno visualizzazione delle lavorazioni
|
||||
EgtEmptyGroup(m_nNbrGrpId)
|
||||
@@ -421,24 +600,28 @@ Public Class SplitModeVM
|
||||
Dim sText As String = String.Empty
|
||||
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
|
||||
sText = EgtMsg(90791) & " " & i.ToString()
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||
Else
|
||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
||||
End If
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.SAWING))
|
||||
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
|
||||
Dim sText As String = EgtMsg(90792) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.DRILLING))
|
||||
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
|
||||
Dim sText As String = EgtMsg(90793) & " " & i.ToString()
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.MILLING))
|
||||
ElseIf Mach.m_nType = MCH_OY.POCKETING Then ' Svuotatura
|
||||
Dim sText As String = EgtMsg(90796) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.POCKETING))
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then ' Waterjet
|
||||
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.WATERJETTING))
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
@@ -478,6 +661,87 @@ Public Class SplitModeVM
|
||||
Not OmagOFFICEMap.refMachiningTabVM.ByHand)
|
||||
' Altri bottoni
|
||||
SplitModeIsEnabled = Not OmagOFFICEMap.refMachiningTabVM.IsShow
|
||||
|
||||
' nascondo i comandi che non devono essere visualizzati in funzione delle lavorazioni attive
|
||||
If m_nCountSawing = 0 And (m_nCountWaterjetting > 0 Or m_nCountOtherMachining > 0) Then
|
||||
VisibilityButtonFromMachining(MCH_OY.WATERJETTING)
|
||||
Else
|
||||
VisibilityButtonFromMachining(MCH_OY.SAWING)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
|
||||
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
Return
|
||||
End If
|
||||
Dim nSawing As Integer = 0
|
||||
Dim nWaterjetting As Integer = 0
|
||||
Dim nOtherMachining As Integer = 0
|
||||
' conto il numero di tipi di lavprazioni
|
||||
For Each Item As NameIdLsBxItem In ItemList
|
||||
If Item.Type = MCH_OY.SAWING Then
|
||||
nSawing += 1
|
||||
ElseIf Item.Type = MCH_OY.WATERJETTING Then
|
||||
nWaterjetting += 1
|
||||
Else
|
||||
nOtherMachining += 1
|
||||
End If
|
||||
Next
|
||||
' verifico se le lavorazioni sono omeogenee
|
||||
If nSawing > 0 And (nWaterjetting > 0 Or nOtherMachining > 0) Then
|
||||
m_bAreHomogeneous = False
|
||||
VisibilityButtonFromMachining(MCH_OY.SAWING)
|
||||
ElseIf nSawing = 0 And nOtherMachining > 0 And nWaterjetting > 0 Then
|
||||
m_bAreHomogeneous = False
|
||||
VisibilityButtonFromMachining(MCH_OY.WATERJETTING)
|
||||
Else
|
||||
VisibilityButtonFromMachining(ItemList(0).Type)
|
||||
m_bAreHomogeneous = True
|
||||
End If
|
||||
' eventualmente stampo messaggio
|
||||
If Not m_bAreHomogeneous Then
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Lavorazioni non omogenee", MSG_TYPE.WARNING)
|
||||
Else
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub VisibilityButtonFromMachining(ByVal Type As Integer)
|
||||
If Type <> MCH_OY.SAWING Then
|
||||
CutBtnVisibility = Visibility.Hidden
|
||||
CutStartBtnVisibility = Visibility.Hidden
|
||||
CutEndBtnVisibility = Visibility.Hidden
|
||||
|
||||
OutCenStartBtnVisibility = Visibility.Hidden
|
||||
OutCenEndBtnVisibility = Visibility.Hidden
|
||||
InvertBtnVisibility = Visibility.Hidden
|
||||
PauseBtnVisibility = Visibility.Hidden
|
||||
AllOutStartBtnVisibility = Visibility.Hidden
|
||||
AllCenStartBtnVisibility = Visibility.Hidden
|
||||
AllOutEndBtnVisibility = Visibility.Hidden
|
||||
AllCenEndBtnVisibility = Visibility.Hidden
|
||||
AllExtendBtnVisibility = Visibility.Hidden
|
||||
AllReduceBtnVisibility = Visibility.Hidden
|
||||
Else
|
||||
CutBtnVisibility = Visibility.Visible
|
||||
CutStartBtnVisibility = Visibility.Visible
|
||||
CutEndBtnVisibility = Visibility.Visible
|
||||
|
||||
OutCenStartBtnVisibility = Visibility.Visible
|
||||
OutCenEndBtnVisibility = Visibility.Visible
|
||||
InvertBtnVisibility = Visibility.Visible
|
||||
PauseBtnVisibility = Visibility.Visible
|
||||
AllOutStartBtnVisibility = Visibility.Visible
|
||||
AllCenStartBtnVisibility = Visibility.Visible
|
||||
AllOutEndBtnVisibility = Visibility.Visible
|
||||
AllCenEndBtnVisibility = Visibility.Visible
|
||||
AllExtendBtnVisibility = Visibility.Visible
|
||||
AllReduceBtnVisibility = Visibility.Visible
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ModifyOtherLeadIn(nI As Integer, nLiOthType As Integer) As Boolean
|
||||
@@ -805,7 +1069,16 @@ Public Class SplitModeVM
|
||||
' Imposto flag di modifica
|
||||
m_bModified = True
|
||||
' Abilitazione bottone Next
|
||||
EnableButtons()
|
||||
' EnableButtons()
|
||||
' recupero l'elenco degli elementi selezionati
|
||||
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||
For Each Item As NameIdLsBxItem In m_SelectedItemsList ' MachiningLsBx.SelectedItems
|
||||
ItemList.Add(Item)
|
||||
Next
|
||||
'For Each Item As NameIdLsBxItem In m_ItemList
|
||||
' If Item.bIsActive Then ItemList.Add(Item)
|
||||
'Next
|
||||
VerifyHomogenousMachining(ItemList)
|
||||
End Sub
|
||||
|
||||
#End Region ' OnOffCommand
|
||||
@@ -1445,13 +1718,22 @@ Public Class SplitModeVM
|
||||
If Not ModifStartWindow.ShowDialog() Then Return
|
||||
' Modifica della lavorazione
|
||||
Dim dUsal As Double = ModifStartWindowVM.GetVal()
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then Return
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
Dim bRepeat As Boolean = False
|
||||
Do
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then Return
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
If bRepeat Then
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
dUsal = dOrigUsal
|
||||
End If
|
||||
Loop Until Not bRepeat
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
@@ -1540,14 +1822,25 @@ Public Class SplitModeVM
|
||||
ModifStartWindowVM.SetVal(dOrigUeal)
|
||||
If Not ModifStartWindow.ShowDialog() Then Return
|
||||
' Modifica della lavorazione
|
||||
Dim dUsal As Double = ModifStartWindowVM.GetVal()
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then Return
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUsal - dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUsal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
Dim dUeal As Double = ModifStartWindowVM.GetVal()
|
||||
Dim bRepeat As Boolean = False
|
||||
Do
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
If bRepeat Then
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
dUeal = dOrigUeal
|
||||
End If
|
||||
Loop Until Not bRepeat
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
@@ -1690,6 +1983,200 @@ Public Class SplitModeVM
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Friend Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not OmagOFFICEMap.refSceneHostVM.MainScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
' Reset drag
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
' Reset selection interface
|
||||
m_nSelected = GDB_ID.NULL
|
||||
' Verifico se selezionato estremo di taglio con lama
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSel As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
||||
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
||||
While nId <> GDB_ID.NULL
|
||||
' Verifico sia un attacco o uscita di taglio con lama
|
||||
Dim nType As Integer = 0
|
||||
Dim sName As String = ""
|
||||
EgtGetName(nId, sName)
|
||||
If String.Compare(sName, NAME_PV_PRECUT) = 0 Then
|
||||
nType = 1
|
||||
ElseIf String.Compare(sName, NAME_PV_POSTCUT) = 0 Then
|
||||
nType = 2
|
||||
ElseIf String.Compare(sName, NAME_PV_CUT) = 0 Then
|
||||
nType = 3
|
||||
End If
|
||||
If nType = 1 Or nType = 2 Then
|
||||
Dim nPvId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||
Dim nMchId As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nPvId, "MId", nMchId) Then
|
||||
For nInd As Integer = 0 To m_MachiningList.Count() - 1
|
||||
If m_MachiningList(nInd).m_nId = nMchId Then
|
||||
m_nDragInd = nInd
|
||||
m_nDragType = nType
|
||||
End If
|
||||
For nJ As Integer = 0 To m_MachiningList(nInd).m_vOthId.Count() - 1
|
||||
If m_MachiningList(nInd).m_vOthId(nJ) = nMchId Then
|
||||
m_nDragInd = nInd
|
||||
m_nDragType = nType
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If m_nDragInd >= 0 Then
|
||||
' Assegno l'id dell'elemento selezionato
|
||||
m_nSelected = m_nDragInd
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If m_nDragInd >= 0 Then
|
||||
' Assegno l'id dell'elemento selezionato
|
||||
m_nSelected = m_nDragInd
|
||||
Exit While
|
||||
End If
|
||||
ElseIf nType = 3 Then
|
||||
Dim nPvId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||
Dim nMchId As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nPvId, "MId", nMchId) Then
|
||||
For nInd As Integer = 0 To m_MachiningList.Count() - 1
|
||||
If m_MachiningList(nInd).m_nId = nMchId Then
|
||||
m_nSelected = nInd
|
||||
End If
|
||||
For nJ As Integer = 0 To m_MachiningList(nInd).m_vOthId.Count() - 1
|
||||
If m_MachiningList(nInd).m_vOthId(nJ) = nMchId Then
|
||||
m_nSelected = nInd
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If m_nSelected >= 0 Then Exit For
|
||||
Next
|
||||
End If
|
||||
If m_nSelected >= 0 Then Exit While
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
' Sistemazioni per drag
|
||||
If m_nSelected >= 0 AndAlso EgtUnProjectPoint(e.Location, m_ptDragPrev) Then
|
||||
Dim nItemIndex = 0
|
||||
For Each Item In ItemList
|
||||
Item.IsSelected = (nItemIndex = m_nSelected)
|
||||
nItemIndex += 1
|
||||
Next
|
||||
Else
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
m_nSelected = GDB_ID.NULL
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||
' Se drag non abilitato o in corso
|
||||
If m_nDragInd = -1L Or m_bDragging Then Return
|
||||
m_bDragging = True
|
||||
Dim nOperId As Integer = m_MachiningList(m_nDragInd).m_nId
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
' Ricavo il vettore di movimento e la variazione di lunghezza
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptDragPrev
|
||||
Dim dDelta = vtMove * m_MachiningList(m_nDragInd).m_vtDir
|
||||
If m_nDragType = 1 Then
|
||||
Dim dOrigUsal As Double = 0
|
||||
Dim dUsal As Double
|
||||
' ----------------------- REPEAT -----------------------
|
||||
Do
|
||||
dDelta = -dDelta
|
||||
' Leggo il valore salvato nella geometria
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
dUsal = dOrigUsal + dDelta
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(m_nDragInd).m_dStartFreeLen < FREELEN_INF Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, CurrentMachine.sMachIniFile), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUsal = Math.Min(dUsal, m_MachiningList(m_nDragInd).m_dStartFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
|
||||
m_bDragging = False
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
Loop Until UpdateMachiningPreview(m_MachiningList(m_nDragInd).m_nId, True)
|
||||
' ----------------------- REPEAT (solo se il segmento scompare) -----------------------
|
||||
Else
|
||||
Dim dOrigUeal As Double = 0
|
||||
Dim dUeal As Double
|
||||
dDelta = -dDelta
|
||||
Do
|
||||
dDelta = -dDelta
|
||||
' Leggo il valore salvato nella geometria
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
dUeal = dOrigUeal + dDelta
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(m_nDragInd).m_dEndFreeLen < FREELEN_INF Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, CurrentMachine.sMachIniFile), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUeal = Math.Min(dUeal, m_MachiningList(m_nDragInd).m_dEndFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
|
||||
m_bDragging = False
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
Loop Until UpdateMachiningPreview(m_MachiningList(m_nDragInd).m_nId, True)
|
||||
End If
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(m_nDragInd).m_nId, m_MachiningList(m_nDragInd).m_nInterf)
|
||||
ColorMachining(m_MachiningList(m_nDragInd))
|
||||
ColorNumberArrow(m_nDragInd)
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
m_bModified = True
|
||||
' Aggiorno punto e stato di drag
|
||||
m_ptDragPrev = ptCurr
|
||||
m_bDragging = False
|
||||
End Sub
|
||||
|
||||
Friend Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||
' Se drag in corso
|
||||
If m_nDragInd >= 0 Then
|
||||
m_nDragInd = -1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Public Class NameIdLsBxItem
|
||||
@@ -1698,6 +2185,7 @@ Public Class SplitModeVM
|
||||
Private m_nInd As Integer
|
||||
Private m_sName As String
|
||||
Private m_bIsActive As Boolean
|
||||
Private m_nType As Integer
|
||||
|
||||
Public Property Ind As Integer
|
||||
Get
|
||||
@@ -1740,16 +2228,31 @@ Public Class SplitModeVM
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(value) Then
|
||||
m_IsSelected = value
|
||||
If value Then
|
||||
If value AndAlso Not OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Contains(Me) Then
|
||||
OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Add(Me)
|
||||
Else
|
||||
OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Remove(Me)
|
||||
End If
|
||||
' se non è stato aggiunto nessun nuovo elemento alla lista dei selezionati allora esco
|
||||
If OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Count = 0 Then
|
||||
EgtDraw()
|
||||
NotifyPropertyChanged("IsSelected")
|
||||
Return
|
||||
End If
|
||||
' se ho un solo elemento allora so che è coerrente con se stesso come lavorazione
|
||||
If OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Count = 1 Then
|
||||
OmagOFFICEMap.refSplitModeVM.m_bAreHomogeneous = True
|
||||
End If
|
||||
' creo lista ordinata dei selezionati
|
||||
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||
For Each Item In OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList
|
||||
ItemList.Add(Item)
|
||||
Next
|
||||
|
||||
' ------------------------ verifico che le lavorazioni siano dello stesso tipo ------------------------
|
||||
OmagOFFICEMap.refSplitModeVM.VerifyHomogenousMachining(ItemList)
|
||||
' -----------------------------------------------------------------------------------------------------
|
||||
|
||||
ItemList.Sort(Function(x, y) Comparer(Of Integer).Default.Compare(OmagOFFICEMap.refSplitModeVM.m_ItemList.IndexOf(x),
|
||||
OmagOFFICEMap.refSplitModeVM.m_ItemList.IndexOf(y)))
|
||||
If Not My.Computer.Keyboard.ShiftKeyDown And (My.Computer.Keyboard.CtrlKeyDown And value) Then
|
||||
@@ -1795,10 +2298,20 @@ Public Class SplitModeVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Name As String, Ind As Integer, bIsActive As Boolean)
|
||||
Public Property Type As Integer
|
||||
Get
|
||||
Return m_nType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nType = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Name As String, Ind As Integer, bIsActive As Boolean, nType As Integer)
|
||||
Me.m_sName = Name
|
||||
Me.m_nInd = Ind
|
||||
Me.m_bIsActive = bIsActive
|
||||
Me.m_nType = nType
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -523,6 +523,7 @@ Public Class NestingTabVM
|
||||
|
||||
Public Sub Draw(ByVal param As Object)
|
||||
Dim CompoWindow As New CompoWindowV(Application.Current.MainWindow, New CompoWindowVM)
|
||||
CompoWindow.Height = 700
|
||||
CompoWindow.ShowDialog()
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
End Sub
|
||||
|
||||
@@ -108,7 +108,7 @@ Public Class RawPartTabVM
|
||||
Private m_dPhotoOffsetX As Double
|
||||
Public Property PhotoOffsetX As String
|
||||
Get
|
||||
Return LenToString(m_dPhotoOffsetX, -2)
|
||||
Return LenToString(m_dPhotoOffsetX, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dVal As Double = 0
|
||||
@@ -125,7 +125,7 @@ Public Class RawPartTabVM
|
||||
Private m_dPhotoOffsetY As Double
|
||||
Public Property PhotoOffsetY As String
|
||||
Get
|
||||
Return LenToString(m_dPhotoOffsetY, -2)
|
||||
Return LenToString(m_dPhotoOffsetY, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dVal As Double = 0
|
||||
@@ -142,7 +142,7 @@ Public Class RawPartTabVM
|
||||
Private m_dPhotoRot As Double
|
||||
Public Property PhotoRot As String
|
||||
Get
|
||||
Return LenToString(m_dPhotoRot, -2)
|
||||
Return LenToString(m_dPhotoRot, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dVal As Double = 0
|
||||
@@ -227,11 +227,11 @@ Public Class RawPartTabVM
|
||||
Public Property Length As String
|
||||
Get
|
||||
If m_InvertKerf < 0 Then
|
||||
Return LenToString(m_dLength + 2 * m_dKerf, -2)
|
||||
Return LenToString(m_dLength + 2 * m_dKerf, 2)
|
||||
Else
|
||||
Return LenToString(m_dLength, -2)
|
||||
Return LenToString(m_dLength, 2)
|
||||
End If
|
||||
'Return LenToString(m_dLength, -2)
|
||||
'Return LenToString(m_dLength, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dLength As Double = 0
|
||||
@@ -279,9 +279,9 @@ Public Class RawPartTabVM
|
||||
Public Property Width As String
|
||||
Get
|
||||
If m_InvertKerf < 0 Then
|
||||
Return LenToString(m_dWidth + 2 * m_dKerf, -2)
|
||||
Return LenToString(m_dWidth + 2 * m_dKerf, 2)
|
||||
Else
|
||||
Return LenToString(m_dWidth, -2)
|
||||
Return LenToString(m_dWidth, 2)
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
@@ -329,7 +329,7 @@ Public Class RawPartTabVM
|
||||
Private m_dHeight As Double
|
||||
Public Property Height As String
|
||||
Get
|
||||
Return LenToString(m_dHeight, -2)
|
||||
Return LenToString(m_dHeight, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dHeight As Double = 0
|
||||
@@ -370,9 +370,9 @@ Public Class RawPartTabVM
|
||||
Public Property OffsetX As String
|
||||
Get
|
||||
If m_InvertKerf < 0 Then
|
||||
Return LenToString(m_dOffsetX - m_dKerf, -2)
|
||||
Return LenToString(m_dOffsetX - m_dKerf, 2)
|
||||
Else
|
||||
Return LenToString(m_dOffsetX, -2)
|
||||
Return LenToString(m_dOffsetX, 2)
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
@@ -435,9 +435,9 @@ Public Class RawPartTabVM
|
||||
Public Property OffsetY As String
|
||||
Get
|
||||
If m_InvertKerf < 0 Then
|
||||
Return LenToString(m_dOffsetY - m_dKerf, -2)
|
||||
Return LenToString(m_dOffsetY - m_dKerf, 2)
|
||||
Else
|
||||
Return LenToString(m_dOffsetY, -2)
|
||||
Return LenToString(m_dOffsetY, 2)
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
@@ -510,7 +510,7 @@ Public Class RawPartTabVM
|
||||
Private m_dKerf As Double
|
||||
Public Property Kerf As String
|
||||
Get
|
||||
Return LenToString(m_dKerf * m_InvertKerf, -2)
|
||||
Return LenToString(m_dKerf * m_InvertKerf, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dKerf As Double = 0
|
||||
@@ -538,7 +538,7 @@ Public Class RawPartTabVM
|
||||
m_dOffsetX = dRawOffsetX
|
||||
m_dOffsetY = dRawOffsetY
|
||||
m_dKerf = dKerf
|
||||
RecalcRawPart()
|
||||
' RecalcRawPart()
|
||||
UpdateRawPartKerf()
|
||||
' Recupero id contorno kerf
|
||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_KERF)
|
||||
@@ -559,7 +559,7 @@ Public Class RawPartTabVM
|
||||
m_dOffsetX = dRawOffsetX - dKerf
|
||||
m_dOffsetY = dRawOffsetY - dKerf
|
||||
m_dKerf = -dKerf
|
||||
RecalcRawPart()
|
||||
' RecalcRawPart()
|
||||
'EstCalc.UpdateRawPart()
|
||||
UpdateRawPartKerf()
|
||||
' Recupero id contorno kerf
|
||||
@@ -942,7 +942,7 @@ Public Class RawPartTabVM
|
||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
||||
'Me.OmagPhoto = New OmagPhotoV(Application.Current.MainWindow(), New OmagPhotoVM)
|
||||
Me.OmagPhoto = New OmagPhotoV
|
||||
If Not PhotoMap.ContninueApplication Then End
|
||||
If Not PhotoMap.ContinueApplication Then End
|
||||
End If
|
||||
' Aggiungo voci alla lista di tipi di definizione grezzo
|
||||
m_TypeList.Add(EgtMsg(MSG_RAWPARTPAGEUC + 1))
|
||||
@@ -1014,6 +1014,7 @@ Public Class RawPartTabVM
|
||||
NotifyPropertyChanged("Width")
|
||||
NotifyPropertyChanged("OffsetX")
|
||||
NotifyPropertyChanged("OffsetY")
|
||||
NotifyPropertyChanged("Height")
|
||||
NotifyPropertyChanged("Kerf")
|
||||
' aggiorno offset e rotazione foto
|
||||
Dim dPhotoOffsetX, dPhotoOffsetY, dPhotoRot As Double
|
||||
@@ -1311,7 +1312,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
|
||||
@@ -1332,7 +1333,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()
|
||||
@@ -1351,7 +1352,12 @@ Public Class RawPartTabVM
|
||||
EgtMovePartInRawPart(nPartId, vtMove)
|
||||
nPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
End While
|
||||
' aggiorno la posizione dei cerchi del Kerf
|
||||
UpdateCircles()
|
||||
' Aggiorno la posizione della zona rovinata
|
||||
UpdateDemageArea(vtMove)
|
||||
End If
|
||||
' aggiorno l'Id del grezzo
|
||||
EstCalc.UpdateRawPart()
|
||||
' Se c'è foto, aggiorno quota fotografia
|
||||
If GetPhoto() <> GDB_ID.NULL Then
|
||||
@@ -1375,7 +1381,7 @@ Public Class RawPartTabVM
|
||||
Dim Col = m_RawCol
|
||||
If GetPhoto() <> GDB_ID.NULL Then Col.A = 20
|
||||
' Aggiorno il grezzo
|
||||
EgtModifyRawPart(EstCalc.GetRawId(), nKerfId, m_dKerf, m_ptTableMin.z, m_dHeight, Col)
|
||||
Dim x As Boolean = EgtModifyRawPart(EstCalc.GetRawId(), nKerfId, m_dKerf, m_ptTableMin.z, m_dHeight, Col)
|
||||
' Salvo il nuovo valore (sempre in mm)
|
||||
EgtSetInfo(EstCalc.GetRawId(), KEY_KERF, m_dKerf)
|
||||
' Aggiorno dimensioni e posizione grezzo
|
||||
@@ -1426,6 +1432,16 @@ Public Class RawPartTabVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateDemageArea(vtMove As Vector3d)
|
||||
Dim nId As Integer = GDB_ID.NULL
|
||||
nId = EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_DAMAGED)
|
||||
While nId <> GDB_ID.NULL
|
||||
EgtMove(nId, vtMove)
|
||||
nId = EgtGetNext(nId)
|
||||
End While
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ModifyPhoto(vtMove As Vector3d)
|
||||
' Non ci deve essere movimento in Z
|
||||
vtMove.z = 0
|
||||
|
||||
@@ -101,9 +101,9 @@ Public Class MachineAxis
|
||||
EgtSetAxisPos(m_Name, dVal)
|
||||
EgtGetAxisPos(m_Name, dVal)
|
||||
If m_Linear Then
|
||||
Value = LenToString(dVal, -3)
|
||||
Value = LenToString(dVal, 3)
|
||||
Else
|
||||
Value = DoubleToString(dVal, -3)
|
||||
Value = DoubleToString(dVal, 3)
|
||||
End If
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
@@ -13,17 +13,19 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Visibility="{Binding Legenda_Visibility}"
|
||||
<!--Titolo delle colonne-->
|
||||
<Grid Visibility="{Binding Legenda_Visibility}"
|
||||
Grid.Row="0"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding FirstColumnMsg}" Grid.Column="1" HorizontalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding SecondColumnMsg}" Grid.Column="2" HorizontalAlignment="Center"/>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--Prima colonna-->
|
||||
<TextBlock Text="{Binding FirstColumnMsg}" Grid.Column="1" HorizontalAlignment="Center"/>
|
||||
<!--Seconda colonna-->
|
||||
<TextBlock Text="{Binding SecondColumnMsg}" Grid.Column="2" HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<EgtWPFLib5:EgtScrollViewer VerticalScrollBarVisibility="Auto"
|
||||
@@ -38,8 +40,10 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--Nome della riga ("An")-->
|
||||
<TextBlock Text="{Binding sEntityName}"
|
||||
VerticalAlignment="Center"/>
|
||||
|
||||
<!--Drip e Engrave-->
|
||||
<UniformGrid Grid.Column="1" Columns="3" Rows="1">
|
||||
<CheckBox IsChecked="{Binding bIsChecked}"
|
||||
@@ -56,6 +60,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</UniformGrid>
|
||||
|
||||
<!--SideAngle-->
|
||||
<UniformGrid Grid.Column="1" Columns="2" Rows="1">
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding GrphSideAngle}"
|
||||
@@ -67,6 +72,41 @@
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</UniformGrid>
|
||||
|
||||
|
||||
<!--Alz&Front-->
|
||||
<Grid Grid.ColumnSpan="2"
|
||||
Grid.Row="2"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox IsChecked="{Binding bIsCheckedAlz}"
|
||||
Grid.Column="1"
|
||||
Visibility="{Binding CheckAlz_Visibility}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
<CheckBox IsChecked="{Binding bIsCheckedFront}"
|
||||
Grid.Column="2"
|
||||
Visibility="{Binding CheckFront_Visibility}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<!--<UniformGrid Grid.Column="1" Columns="2" Rows="1">
|
||||
<CheckBox IsChecked="{Binding bIsCheckedAlz}"
|
||||
Grid.Column="1"
|
||||
Visibility="{Binding CheckAlz_Visibility}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
<CheckBox IsChecked="{Binding bIsCheckedFront}"
|
||||
Grid.Column="1"
|
||||
Visibility="{Binding CheckFront_Visibility}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</UniformGrid>-->
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
@@ -104,7 +144,7 @@
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter2a}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter2b}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid Visibility="{Binding Parameter23_Visibility}"
|
||||
Grid.Row="4"
|
||||
|
||||
@@ -5,11 +5,20 @@ Imports EgtWPFLib5
|
||||
Public Class SideEntityControlVM
|
||||
Inherits VMBase
|
||||
|
||||
Private Const INFO_ALZFRONT As String = "AF"
|
||||
|
||||
Public Enum ModeOpt As Integer
|
||||
SIDEANGLE = 0 ' inclina lato
|
||||
DRIP = 1 ' incidi da sotto
|
||||
ENGRAVE = 2 ' incidi da sopra
|
||||
FILOTOP = 3 ' filo top
|
||||
ALZANDFRONT = 4 ' alzatine e frontalini
|
||||
End Enum
|
||||
|
||||
Public Enum ModeAlzAndFront
|
||||
ALZATINA = 0
|
||||
FRONTALINO = 1
|
||||
NONE = 2
|
||||
End Enum
|
||||
|
||||
Public Enum CallingWindowOpt As Integer
|
||||
@@ -33,11 +42,14 @@ Public Class SideEntityControlVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Titolo colonne"
|
||||
|
||||
' stampa il nome delle colonne
|
||||
Public ReadOnly Property Legenda_Visibility As Visibility
|
||||
Get
|
||||
If m_Mode = SideEntityControlVM.ModeOpt.FILOTOP OrElse
|
||||
m_SideEntityList.Count() = 0 Then
|
||||
If m_Mode = SideEntityControlVM.ModeOpt.FILOTOP OrElse m_SideEntityList.Count() = 0 Then
|
||||
Return Visibility.Collapsed
|
||||
ElseIf m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE And m_SideAngleCheck Then
|
||||
Return Visibility.Collapsed
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
@@ -54,6 +66,9 @@ Public Class SideEntityControlVM
|
||||
ElseIf m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
|
||||
' A°
|
||||
sMsg = EgtMsg(91653)
|
||||
ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||
' Alz
|
||||
sMsg = "Alz."
|
||||
End If
|
||||
Return sMsg
|
||||
End Get
|
||||
@@ -68,32 +83,17 @@ Public Class SideEntityControlVM
|
||||
ElseIf m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
|
||||
' T
|
||||
sMsg = EgtMsg(91654)
|
||||
ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||
' Front
|
||||
sMsg = "Front."
|
||||
End If
|
||||
Return sMsg
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Parameter23_Visibility As Visibility
|
||||
Public Property Parameter23_Visibility As Visibility
|
||||
Get
|
||||
Return m_Parameter23_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_Parameter23_Visibility = value
|
||||
NotifyPropertyChanged("Parameter23_Visibility")
|
||||
End Set
|
||||
End Property
|
||||
#End Region 'Titolo colonne
|
||||
|
||||
Private m_Parameter4_Visibility As Visibility
|
||||
Public Property Parameter4_Visibility As Visibility
|
||||
Get
|
||||
Return m_Parameter4_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_Parameter4_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(Parameter4_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
#Region "Parameter 1"
|
||||
|
||||
Private m_Parameter1_Visibility As Visibility
|
||||
Public ReadOnly Property Parameter1_Visibility As Visibility
|
||||
@@ -116,7 +116,7 @@ Public Class SideEntityControlVM
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
Return DoubleToString(m_Parameter1, 2)
|
||||
Else
|
||||
Return LenToString(m_Parameter1, -2)
|
||||
Return LenToString(m_Parameter1, 2)
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
@@ -145,15 +145,22 @@ Public Class SideEntityControlVM
|
||||
StringToLen(value, m_dDripOffset)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
' Aggiorno i dati delle alette
|
||||
RefreshDataAlzAndFront()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter1(value As Double)
|
||||
m_Parameter1 = value
|
||||
SideAngleEntity.m_Parameter1 = value
|
||||
AlzAndFrontEntity.m_Parameter1 = value
|
||||
NotifyPropertyChanged("Parameter1")
|
||||
End Sub
|
||||
|
||||
#End Region 'Parameter 1
|
||||
|
||||
#Region "Parameter 2"
|
||||
|
||||
Private m_Parameter2_Visibility As Visibility = Visibility.Visible
|
||||
Public Property Parameter2_Visibility As Visibility
|
||||
Get
|
||||
@@ -171,7 +178,7 @@ Public Class SideEntityControlVM
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
Return LenToString(m_Parameter2, 2)
|
||||
Else
|
||||
Return LenToString(m_Parameter2, -2)
|
||||
Return LenToString(m_Parameter2, 2)
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
@@ -225,23 +232,40 @@ Public Class SideEntityControlVM
|
||||
End Property
|
||||
|
||||
Private m_Parameter2a As Integer
|
||||
Private m_dParameter2a As Double
|
||||
Public Property Parameter2a As String
|
||||
Get
|
||||
If m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
Return DoubleToString(m_dParameter2a, 2)
|
||||
End If
|
||||
Return DoubleToString(m_Parameter2a, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
' recupero il valore passato come intero
|
||||
StringToInt(value, m_Parameter2a)
|
||||
' recupero il valore passato come double
|
||||
StringToDouble(value, m_dParameter2a)
|
||||
' Recupero il valore
|
||||
StringToInt(value, m_nEngrNbr2)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
' Aggiorno i dati delle alette
|
||||
RefreshDataAlzAndFront()
|
||||
End Set
|
||||
End Property
|
||||
' Gestione del dato intero (Incisioni)
|
||||
Private Sub SetParameter2a(value As Integer)
|
||||
m_Parameter2a = value
|
||||
SideAngleEntity.m_Parameter2a = value
|
||||
NotifyPropertyChanged("Parameter2a")
|
||||
End Sub
|
||||
' Gestione del dato Double (Alette)
|
||||
Private Sub SetdParameter2a(value As Double)
|
||||
m_dParameter2a = value
|
||||
SideAngleEntity.m_dParameter2a = value
|
||||
AlzAndFrontEntity.m_dParameter2a = value
|
||||
NotifyPropertyChanged("Parameter2a")
|
||||
End Sub
|
||||
|
||||
Private m_Parameter2b As Double
|
||||
Public Property Parameter2b As String
|
||||
@@ -254,18 +278,36 @@ Public Class SideEntityControlVM
|
||||
StringToLen(value, m_dDripOffset2)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
' Aggiorno i dati delle alette
|
||||
RefreshDataAlzAndFront()
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter2b(value As Double)
|
||||
m_Parameter2b = value
|
||||
SideAngleEntity.m_Parameter2b = value
|
||||
AlzAndFrontEntity.m_Parameter2b = value
|
||||
NotifyPropertyChanged("Parameter2b")
|
||||
End Sub
|
||||
|
||||
#End Region 'Parameter 2
|
||||
|
||||
#Region "Parameter 3"
|
||||
|
||||
Private m_Parameter23_Visibility As Visibility
|
||||
Public Property Parameter23_Visibility As Visibility
|
||||
Get
|
||||
Return m_Parameter23_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_Parameter23_Visibility = value
|
||||
NotifyPropertyChanged("Parameter23_Visibility")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter3 As Double
|
||||
Public Property Parameter3 As String
|
||||
Get
|
||||
Return LenToString(m_Parameter3, -2)
|
||||
Return LenToString(m_Parameter3, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_Mode <> ModeOpt.SIDEANGLE Then
|
||||
@@ -273,18 +315,36 @@ Public Class SideEntityControlVM
|
||||
m_dDripDepth = m_Parameter3
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
' Aggiorno i dati delle alette
|
||||
RefreshDataAlzAndFront()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter3(value As Double)
|
||||
m_Parameter3 = value
|
||||
AlzAndFrontEntity.m_Parameter3 = value
|
||||
NotifyPropertyChanged("Parameter3")
|
||||
End Sub
|
||||
|
||||
#End Region 'Parameter 3
|
||||
|
||||
#Region "Parameter 4"
|
||||
|
||||
Private m_Parameter4_Visibility As Visibility
|
||||
Public Property Parameter4_Visibility As Visibility
|
||||
Get
|
||||
Return m_Parameter4_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_Parameter4_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(Parameter4_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter4 As Double
|
||||
Public Property Parameter4 As String
|
||||
Get
|
||||
Return LenToString(m_Parameter4, -2)
|
||||
Return LenToString(m_Parameter4, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_Mode <> ModeOpt.SIDEANGLE Then
|
||||
@@ -300,8 +360,15 @@ Public Class SideEntityControlVM
|
||||
NotifyPropertyChanged("Parameter4")
|
||||
End Sub
|
||||
|
||||
#End Region 'Parameter 4
|
||||
|
||||
Private m_dSideAngle As Double = 0
|
||||
|
||||
Private m_HeightA As Double = 0
|
||||
Private m_HeightF As Double = 0
|
||||
Private m_DeltaAngF As Double = 0
|
||||
Private m_DeltaAngA As Double = 0
|
||||
|
||||
Private m_dOffsetFiloTop As Double = 5
|
||||
Private m_dDepthFiloTop As Double = 5
|
||||
|
||||
@@ -338,15 +405,24 @@ Public Class SideEntityControlVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Parameter3Msg As String
|
||||
Private m_Parameter3Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 11)
|
||||
Public Property Parameter3Msg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||
Return m_Parameter3Msg ' Affondamento
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Parameter3Msg = value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property Parameter4Msg As String
|
||||
|
||||
Private m_Parameter4Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 12)
|
||||
Public Property Parameter4Msg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_IMPORTPAGEUC + 12) ' Accorciamento
|
||||
Return m_Parameter4Msg ' Accorciamento
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Parameter4Msg = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
@@ -368,11 +444,14 @@ Public Class SideEntityControlVM
|
||||
m_SideAngleCheck = If(GetMainPrivateProfileInt(S_COMPO, K_SIDEMODE, 0) = 0, True, False)
|
||||
SideAngleEntity.dMaxSideAng = GetMainPrivateProfileDouble(S_SIDES, K_MAXSIDEANGLE, SideAngleEntity.STD_MAXSIDEANG)
|
||||
|
||||
'------------------ DEFINIZIONE LISTA LATI
|
||||
' creo la lista dei parametri
|
||||
If CallingWindow = CallingWindowOpt.COMPO Then
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(CallingWndScene.GetCtx())
|
||||
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||
InitSides()
|
||||
' aggiorno i testi sui lati della figura
|
||||
RefreshSideAngleText()
|
||||
|
||||
ElseIf CallingWindow = CallingWindowOpt.DXFIMPORT Then
|
||||
@@ -380,14 +459,25 @@ Public Class SideEntityControlVM
|
||||
EgtSetCurrentContext(CallingWndScene.GetCtx())
|
||||
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||
InitSides()
|
||||
' aggiorno i testi sui lati della figura
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
|
||||
' Gestisco visualizzazione dei parametri
|
||||
If m_Mode = ModeOpt.SIDEANGLE Or m_Mode = ModeOpt.FILOTOP Then
|
||||
'------------------ VISIBILITA' PARAMETRI
|
||||
' Gestisco visualizzazione dei parametri (sotto l'elenco dei parametri)
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
Parameter23_Visibility = Windows.Visibility.Hidden
|
||||
Parameter2_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Hidden
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
Parameter23_Visibility = Windows.Visibility.Hidden
|
||||
Parameter2_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Hidden
|
||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
Parameter2_Visibility = Visibility.Hidden
|
||||
Parameter23_Visibility = Windows.Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Visible
|
||||
Parameter4_Visibility = Visibility.Hidden
|
||||
Else
|
||||
' Temporaneamente lo disabilito
|
||||
Parameter23_Visibility = Windows.Visibility.Visible
|
||||
@@ -396,12 +486,14 @@ Public Class SideEntityControlVM
|
||||
Parameter2_Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
'------------------ VALORI E TITOLI PARAMETRI
|
||||
' Aggiorno valori delle TextBlock che indicano i titoli delle colonne
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
|
||||
Parameter2Msg = EgtMsg(91002) ' Tallone
|
||||
m_dSideAngle = GetMainPrivateProfileDouble(S_SIDES, K_SIDEANGLE, 45)
|
||||
SetParameter1(m_dSideAngle)
|
||||
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
Dim x As String = EgtMsg(MSG_IMPORTPAGEUC + 11)
|
||||
@@ -410,7 +502,8 @@ Public Class SideEntityControlVM
|
||||
m_dDepthFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5)
|
||||
SetParameter1(m_dOffsetFiloTop)
|
||||
SetParameter2(m_dDepthFiloTop)
|
||||
Else
|
||||
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Or m_Mode = ModeOpt.DRIP Then
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
Parameter2Msg = EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset 2
|
||||
m_dDripOffset = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20)
|
||||
@@ -424,6 +517,22 @@ Public Class SideEntityControlVM
|
||||
SetParameter2b(m_dDripOffset2)
|
||||
SetParameter3(m_dDripDepth)
|
||||
SetParameter4(m_dDripShort)
|
||||
|
||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
' definisco i nomi dei campi
|
||||
Parameter1Msg = "Spessore"
|
||||
Parameter2Msg = "Altezza"
|
||||
Parameter3Msg = "Delta Ang."
|
||||
' carico i valori letti da file ini
|
||||
m_HeightA = GetMainPrivateProfileDouble("Alz&Front", "A_Height", 0)
|
||||
m_HeightF = GetMainPrivateProfileDouble("Alz&Front", "F_Height", 0)
|
||||
m_DeltaAngF = GetMainPrivateProfileDouble("Alz&Front", "F_DeltaAng", 0)
|
||||
SetParameter1(EstCalc.GetRawHeight)
|
||||
SetdParameter2a(m_HeightA)
|
||||
SetParameter2b(m_HeightF)
|
||||
SetParameter3(m_DeltaAngF)
|
||||
' ricalcolo le alette della figura
|
||||
LoadCurrentCompo()
|
||||
End If
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
@@ -437,12 +546,13 @@ Public Class SideEntityControlVM
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
' aggiorno i messaggi scritti sui lati della figura (anche per le alette)
|
||||
Private Sub RefreshSideAngleText()
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_CallingWndScene.GetCtx())
|
||||
Dim PartId As Integer = GDB_ID.NULL
|
||||
Dim LoopId As Integer = GDB_ID.NULL
|
||||
|
||||
If m_CallingWindow = CallingWindowOpt.COMPO Then
|
||||
' Ricavo nome primo pezzo
|
||||
PartId = If(CompoWindowMap.refCompoSceneHostV.SelectedLayer <> GDB_ID.NULL, EgtGetFirstInGroup(GDB_ID.ROOT), GDB_ID.NULL)
|
||||
@@ -479,14 +589,26 @@ Public Class SideEntityControlVM
|
||||
If SideEntity.dSideHeel > 10 * EPS_SMALL Then sText += "; " & LenToString(SideEntity.dSideHeel, 1)
|
||||
AddTextToLine(sText, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||
Next
|
||||
' Altrimenti modalità gocciolatoio
|
||||
Else
|
||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
' ---------------- ATTENZIONE ----------------
|
||||
' tutta le gestione dei mesaggi è eseguita dal file lua della componente!
|
||||
' Per ogni entità, creo testo con nome e angolo di inclinazione
|
||||
For Each Entity In m_SideEntityList
|
||||
Dim SideEntity As AlzAndFrontEntity = TryCast(Entity, AlzAndFrontEntity)
|
||||
Dim sText As String = Entity.sEntityName '& " = " & DoubleToString(SideEntity.dSideAngle, 1) & "°"
|
||||
'If SideEntity.dSideHeel > 10 * EPS_SMALL Then sText += "; " & LenToString(SideEntity.dSideHeel, 1)
|
||||
'AddTextToLine(sText, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||
Next
|
||||
' Altrimenti modalità gocciolatoio
|
||||
ElseIf m_Mode = ModeOpt.DRIP Or m_Mode = ModeOpt.ENGRAVE Then
|
||||
' Per ogni entità creo testo con nome
|
||||
For Each Entity In m_SideEntityList
|
||||
AddTextToLine(Entity.sEntityName, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||
Next
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
CreateDripGeom(PartId)
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
'--- ??? ---
|
||||
End If
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
@@ -544,7 +666,16 @@ Public Class SideEntityControlVM
|
||||
nOtherIndex += 1
|
||||
End If
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
|
||||
' --- NON FARE NIENTE ---
|
||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
If VerifySideAnglePossible(PrevLine, CurrLine, NextLine, bOutLoop) And ApprovedSideToAlzFront(CurrLine) Then
|
||||
' Aggiungo il lato alla lista di quelli inclinabili e ne azzero l'inclinazione
|
||||
AddAlzAndFront(CurrLine, TextLayer, dBBoxRad, nEntityIndex)
|
||||
nEntityIndex += 1
|
||||
Else
|
||||
EgtSetName(CurrLine, "B" & nOtherIndex.ToString())
|
||||
nOtherIndex += 1
|
||||
End If
|
||||
Else
|
||||
If VerifyIsSideDripPossible(PrevLine, CurrLine, NextLine) Then
|
||||
' Aggiungo il lato alla lista di quelli su cui è possibile mettere il gocciolatoio
|
||||
@@ -646,6 +777,30 @@ Public Class SideEntityControlVM
|
||||
AddTextToLine(sText, TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||
End Sub
|
||||
|
||||
' Funzione che gestisce l'aggiunta delle alzatine nella lista
|
||||
Private Sub AddAlzAndFront(CurrLine As Integer, TextLayer As Integer, dBBoxRad As Double, nEntityIndex As Integer)
|
||||
' Imposto nome del lato
|
||||
EgtSetName(CurrLine, "A" & nEntityIndex.ToString())
|
||||
Dim sEntityName As String = String.Empty
|
||||
EgtGetName(CurrLine, sEntityName)
|
||||
Dim NewEntity As AlzAndFrontEntity = Nothing
|
||||
NewEntity = New AlzAndFrontEntity(CurrLine, sEntityName, TextLayer, ModeOpt.ALZANDFRONT)
|
||||
Dim sInfo As String = "0"
|
||||
EgtGetInfo(CurrLine, "AF", sInfo)
|
||||
If sInfo = "1" Then
|
||||
NewEntity.SetbIsCheckedAlz(True)
|
||||
ElseIf sInfo = "2" Then
|
||||
NewEntity.SetbIsCheckedFront(True)
|
||||
Else
|
||||
NewEntity.SetbIsCheckedAlz(False)
|
||||
NewEntity.SetbIsCheckedFront(False)
|
||||
End If
|
||||
EgtSetInfo(NewEntity.nGeomId, "IsModify", 0)
|
||||
m_SideEntityList.Add(NewEntity)
|
||||
NotifyPropertyChanged("Legenda_Visibility")
|
||||
'AddTextToLine("A" & CurrLine.ToString, TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||
End Sub
|
||||
|
||||
' Funzione che gestisce le operazioni sull'entità con gocciolatoio
|
||||
Private Sub AddDripSide(CurrLine As Integer, TextLayer As Integer, dBBoxRad As Double, nEntityIndex As Integer)
|
||||
' Imposto nome del lato
|
||||
@@ -837,6 +992,7 @@ Public Class SideEntityControlVM
|
||||
End Sub
|
||||
|
||||
Friend Sub CreateDripGeom(nPartId As Integer)
|
||||
If nPartId = GDB_ID.NULL Then Return
|
||||
' Recupero Id layer di contorno esterno
|
||||
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
||||
' Preparo layer con geometria gocciolatoi (svuotandolo o creandolo)
|
||||
@@ -864,6 +1020,8 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
Next
|
||||
|
||||
If vJoint.Count < 1 Then Return
|
||||
|
||||
If vJoint(0) And vJoint(vJoint.Count - 1) Then
|
||||
bJointStart = True
|
||||
End If
|
||||
@@ -1416,6 +1574,160 @@ Public Class SideEntityControlVM
|
||||
End While
|
||||
End Sub
|
||||
|
||||
'---------------------- GESTIONE ALZATIENE E FRONTALINI ----------------------
|
||||
' eseguo compo
|
||||
Shared Sub LoadCurrentCompo()
|
||||
Dim m_dBBoxRad As Double = 0.5 * Point3d.DistXY(EstCalc.GetRawPtMin, EstCalc.GetRawPtMax)
|
||||
Dim m_dH As Double = 0.05 * m_dBBoxRad
|
||||
|
||||
' !! ATTENZIONE !! : per problemi di spazio è stata spenta la text per stampare i messaggi (ma potrebbe servire?)
|
||||
' Pulisco l'ambiente lua
|
||||
EgtLuaResetGlobVar("CMP")
|
||||
EgtLuaResetGlobVar("CMP_Draw")
|
||||
|
||||
Dim nCompoName As Integer
|
||||
Dim sCompoFile As String = ""
|
||||
Dim sCompoImage As String = ""
|
||||
|
||||
' recupero il nome del direttorio
|
||||
Dim sCompoDir As String = String.Empty
|
||||
GetMainPrivateProfileString("Alz&Front", K_COMPODIR, "", sCompoDir)
|
||||
' leggo le info inserite nel campo "Alz&Front"
|
||||
Dim CItem As CompoItem = CompoWindowMap.refCompoListPageVM.GetPrivateProfileCompo("Alz&Front", "Alz&Front")
|
||||
nCompoName = CItem.Index
|
||||
sCompoFile = CItem.LuaPath
|
||||
sCompoImage = CItem.ImagePath
|
||||
'Dim sCompoImageSource As ImageSource
|
||||
|
||||
' Costruisco path completa del componente
|
||||
Dim sPath = sCompoDir & "\" & sCompoFile
|
||||
' Carico il file
|
||||
EgtLuaExecFile(sPath)
|
||||
|
||||
' carico la lista di variabili
|
||||
Dim dVal As Double
|
||||
If StringToLen(AlzAndFrontEntity.m_dParameter2a.ToString, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.A_Height", dVal)
|
||||
End If
|
||||
If StringToLen(AlzAndFrontEntity.m_Parameter2b.ToString, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.F_Height", dVal)
|
||||
End If
|
||||
If StringToLen("0", dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.A_DeltaAng", dVal)
|
||||
End If
|
||||
If StringToLen("0", dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.F_DeltaAng", dVal)
|
||||
End If
|
||||
' deve essere imposta sempre la dimensione della lastra
|
||||
If StringToLen(AlzAndFrontEntity.m_Parameter1.ToString, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.ThicknessRaw", dVal)
|
||||
End If
|
||||
' parametri per la scrittura dei caratteri
|
||||
EgtLuaSetGlobNumVar("CMP.BBoxRad", m_dBBoxRad)
|
||||
EgtLuaSetGlobNumVar("CMP.HeightText", m_dH)
|
||||
|
||||
|
||||
Dim sMsg As String = String.Empty
|
||||
' eseguo la funzione per il disegno della componente (CMP_Draw)
|
||||
If Not EgtLuaExecLine("CMP_Draw" & "(true)") Then
|
||||
sMsg = "Error in component execution"
|
||||
'm_bDrawOk = False
|
||||
Else
|
||||
EgtLuaGetGlobStringVar("CMP" & ".MSG", sMsg)
|
||||
Dim nErr As Integer = 0
|
||||
EgtLuaGetGlobIntVar("CMP" & ".ERR", nErr)
|
||||
'm_bDrawOk = (nErr = 0)
|
||||
End If
|
||||
' aggiorno la grafica
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
' restituisce vero se il lato possiede delle info legate al sideangle
|
||||
Private Function VerifyIsThereSideAngle(nCurrLine As Integer) As Boolean
|
||||
Dim sInfoSideAngle As String = String.Empty
|
||||
EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, sInfoSideAngle)
|
||||
If Not String.IsNullOrWhiteSpace(sInfoSideAngle) Or Not String.IsNullOrEmpty(sInfoSideAngle) Then
|
||||
' verifico che il dato salvato sia un double
|
||||
Try
|
||||
Dim dSideAngle As Double = 0
|
||||
StringToDouble(sInfoSideAngle, dSideAngle)
|
||||
If dSideAngle <> 0 Then
|
||||
Return True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' restituisce vero se il lato possiede delle info legate alle alette
|
||||
Private Function VerifyIsThereAlzFront(nCurrLine As Integer) As Boolean
|
||||
Dim sInfoAlzFront As String = String.Empty
|
||||
EgtGetInfo(nCurrLine, INFO_ALZFRONT, sInfoAlzFront)
|
||||
If Not String.IsNullOrWhiteSpace(sInfoAlzFront) Or Not String.IsNullOrEmpty(sInfoAlzFront) Then
|
||||
If sInfoAlzFront.Trim <> "0" Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' approvo la costruzione dell'aletta sul lato indicato
|
||||
Private Function ApprovedSideToAlzFront(nCurrLine As Integer) As Boolean
|
||||
If VerifyIsThereSideAngle(nCurrLine) And Not VerifyIsThereAlzFront(nCurrLine) Then
|
||||
' se esiste SideAngle e un'aletta allora NON approvo
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Shared Sub RefreshEntity(bIsAlz As Boolean, bIsChecked As Boolean, GeneralSideEntity As SideEntity, Optional DrawCompo As Boolean = True)
|
||||
|
||||
Dim Loacl_AlzFrontEntity As AlzAndFrontEntity = Nothing
|
||||
Try
|
||||
Loacl_AlzFrontEntity = DirectCast(GeneralSideEntity, AlzAndFrontEntity)
|
||||
Catch ex As Exception
|
||||
Return
|
||||
End Try
|
||||
If bIsAlz Then
|
||||
If bIsChecked Then
|
||||
Loacl_AlzFrontEntity.Type = ModeAlzAndFront.ALZATINA
|
||||
Else
|
||||
Loacl_AlzFrontEntity.Type = ModeAlzAndFront.NONE
|
||||
End If
|
||||
Else
|
||||
If bIsChecked Then
|
||||
Loacl_AlzFrontEntity.Type = ModeAlzAndFront.FRONTALINO
|
||||
Else
|
||||
Loacl_AlzFrontEntity.Type = ModeAlzAndFront.NONE
|
||||
End If
|
||||
End If
|
||||
Select Case Loacl_AlzFrontEntity.Type
|
||||
Case SideEntityControlVM.ModeAlzAndFront.NONE
|
||||
EgtSetInfo(Loacl_AlzFrontEntity.nGeomId, INFO_ALZFRONT, 0)
|
||||
Case SideEntityControlVM.ModeAlzAndFront.ALZATINA
|
||||
EgtSetInfo(Loacl_AlzFrontEntity.nGeomId, INFO_ALZFRONT, 1)
|
||||
Case SideEntityControlVM.ModeAlzAndFront.FRONTALINO
|
||||
EgtSetInfo(Loacl_AlzFrontEntity.nGeomId, INFO_ALZFRONT, 2)
|
||||
End Select
|
||||
EgtSetInfo(Loacl_AlzFrontEntity.nGeomId, "IsModify", 1)
|
||||
' di default viene ricostruito tutto il disegno
|
||||
If DrawCompo Then LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshDataAlzAndFront()
|
||||
If m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
AlzAndFrontEntity.m_Parameter1 = m_Parameter1
|
||||
AlzAndFrontEntity.m_dParameter2a = m_dParameter2a
|
||||
AlzAndFrontEntity.m_Parameter2b = m_Parameter2b
|
||||
AlzAndFrontEntity.m_Parameter3 = m_Parameter3
|
||||
LoadCurrentCompo()
|
||||
WriteMainPrivateProfileString("Alz&Front", "A_Height", LenToString(AlzAndFrontEntity.m_dParameter2a, 2))
|
||||
WriteMainPrivateProfileString("Alz&Front", "F_Height", LenToString(AlzAndFrontEntity.m_Parameter2b, 2))
|
||||
WriteMainPrivateProfileString("Alz&Front", "F_DeltaAng", LenToString(AlzAndFrontEntity.m_Parameter3, 2))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -1456,6 +1768,8 @@ Public MustInherit Class SideEntity
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
End If
|
||||
ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||
Return Visibility.Collapsed
|
||||
Else
|
||||
Return Visibility.Collapsed
|
||||
End If
|
||||
@@ -1469,6 +1783,8 @@ Public MustInherit Class SideEntity
|
||||
Else
|
||||
Return Visibility.Collapsed
|
||||
End If
|
||||
ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||
Return Visibility.Collapsed
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
End If
|
||||
@@ -1478,10 +1794,85 @@ Public MustInherit Class SideEntity
|
||||
' imposto la visibilità delle TextBox per Drip ed Engrave
|
||||
Public ReadOnly Property Value_Visibility_DE As Visibility
|
||||
Get
|
||||
Return Visibility.Visible
|
||||
If m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||
Return Visibility.Collapsed
|
||||
ElseIf m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
|
||||
Return Visibility.Collapsed
|
||||
Else
|
||||
Return Visibility.Visible
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'--------------------------ALZ AND FRONT -----------------------------
|
||||
Public ReadOnly Property CheckAlz_Visibility As Visibility
|
||||
Get
|
||||
If m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||
Return Visibility.Visible
|
||||
Else
|
||||
Return Visibility.Collapsed
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property CheckFront_Visibility As Visibility
|
||||
Get
|
||||
If m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||
Return Visibility.Visible
|
||||
Else
|
||||
Return Visibility.Collapsed
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bIsCheckedAlz As Boolean = False
|
||||
Public Property bIsCheckedAlz As Boolean
|
||||
Get
|
||||
Return m_bIsCheckedAlz
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value Then
|
||||
m_bIsCheckedAlz = True
|
||||
m_bIsCheckedFront = False
|
||||
Else
|
||||
m_bIsCheckedAlz = False
|
||||
End If
|
||||
SideEntityControlVM.RefreshEntity(True, value, Me)
|
||||
NotifyPropertyChanged("bIsCheckedAlz")
|
||||
NotifyPropertyChanged("bIsCheckedFront")
|
||||
End Set
|
||||
End Property
|
||||
Public Sub SetbIsCheckedAlz(value As Boolean)
|
||||
' con questa funzione evito di ridisegnare la pagina delle alzatine per ognilato
|
||||
m_bIsCheckedAlz = value
|
||||
NotifyPropertyChanged("bIsCheckedAlz")
|
||||
NotifyPropertyChanged("bIsCheckedFront")
|
||||
End Sub
|
||||
|
||||
Private m_bIsCheckedFront As Boolean = False
|
||||
Public Property bIsCheckedFront As Boolean
|
||||
Get
|
||||
Return m_bIsCheckedFront
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value Then
|
||||
m_bIsCheckedAlz = False
|
||||
m_bIsCheckedFront = True
|
||||
Else
|
||||
m_bIsCheckedFront = False
|
||||
End If
|
||||
SideEntityControlVM.RefreshEntity(False, value, Me)
|
||||
NotifyPropertyChanged("bIsCheckedAlz")
|
||||
NotifyPropertyChanged("bIsCheckedFront")
|
||||
End Set
|
||||
End Property
|
||||
Public Sub SetbIsCheckedFront(value As Boolean)
|
||||
' con questa funzione evito di ridisegnare la pagina delle alzatine per ognilato
|
||||
m_bIsCheckedFront = value
|
||||
NotifyPropertyChanged("bIsCheckedAlz")
|
||||
NotifyPropertyChanged("bIsCheckedFront")
|
||||
End Sub
|
||||
'--------------------------ALZ AND FRONT -----------------------------
|
||||
|
||||
Public MustOverride Property bIsChecked As Boolean
|
||||
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, Mode As SideEntityControlVM.ModeOpt)
|
||||
@@ -1508,6 +1899,7 @@ Friend Class SideAngleEntity
|
||||
Friend Shared m_Parameter1 As Double
|
||||
Friend Shared m_Parameter2 As Double
|
||||
Friend Shared m_Parameter2a As Integer
|
||||
Friend Shared m_dParameter2a As Double
|
||||
Friend Shared m_Parameter2b As Double
|
||||
Friend Shared m_ModifySideAngle As Action(Of String, Double)
|
||||
Friend Shared m_ModifySideHeel As Action(Of String, Double)
|
||||
@@ -1906,4 +2298,147 @@ Friend Class ColorEngrave
|
||||
Return False
|
||||
End Function
|
||||
|
||||
End Class
|
||||
End Class
|
||||
|
||||
Friend Class AlzAndFrontEntity
|
||||
Inherits SideEntity
|
||||
|
||||
Public Const STD_MAXSIDEANG As Double = 50.0
|
||||
Public Const MAX_MAXSIDEANG As Double = 75.0
|
||||
Private Shared m_dMaxSideAng As Double = STD_MAXSIDEANG
|
||||
Friend Shared WriteOnly Property dMaxSideAng As Double
|
||||
Set(value As Double)
|
||||
m_dMaxSideAng = Math.Max(Math.Min(value, MAX_MAXSIDEANG), 0)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Shared m_Parameter1 As Double
|
||||
Friend Shared m_Parameter2 As Double
|
||||
Friend Shared m_Parameter2a As Integer
|
||||
Friend Shared m_dParameter2a As Double
|
||||
Friend Shared m_Parameter2b As Double
|
||||
Friend Shared m_Parameter3 As Double
|
||||
Friend Shared m_ModifySideAngle As Action(Of String, Double)
|
||||
Friend Shared m_ModifySideHeel As Action(Of String, Double)
|
||||
Friend Shared m_RefreshSideAngleText As Action
|
||||
|
||||
'Private m_dSideAngle As Double
|
||||
'Public Property GrphSideAngle As String
|
||||
' Get
|
||||
' Return DoubleToString(m_dSideAngle, 2)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If Not String.IsNullOrWhiteSpace(value) Then StringToDouble(value, dVal)
|
||||
' If dVal <> m_dSideAngle Then
|
||||
' ' Assegno controllando i limiti
|
||||
' If dVal < -m_dMaxSideAng Then
|
||||
' m_dSideAngle = -m_dMaxSideAng
|
||||
' NotifyPropertyChanged("GrphSideAngle")
|
||||
' ElseIf dVal > m_dMaxSideAng Then
|
||||
' m_dSideAngle = m_dMaxSideAng
|
||||
' NotifyPropertyChanged("GrphSideAngle")
|
||||
' Else
|
||||
' m_dSideAngle = dVal
|
||||
' End If
|
||||
' ' Lo modifico nella geometria e nella lista inclinazioni
|
||||
' m_ModifySideAngle(sEntityName, dSideAngle)
|
||||
' ' Aggiorno tutti i testi
|
||||
' m_RefreshSideAngleText()
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
'Public Property dSideAngle As Double
|
||||
' Get
|
||||
' Return m_dSideAngle
|
||||
' End Get
|
||||
' Set(value As Double)
|
||||
' ' Assegno controllando i limiti
|
||||
' If value < -m_dMaxSideAng Then
|
||||
' m_dSideAngle = -m_dMaxSideAng
|
||||
' ElseIf value > m_dMaxSideAng Then
|
||||
' m_dSideAngle = m_dMaxSideAng
|
||||
' Else
|
||||
' m_dSideAngle = value
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Private m_dSideHeel As Double
|
||||
'Public Property GrphSideHeel As String
|
||||
' Get
|
||||
' Return LenToString(m_dSideHeel, 2)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If Not String.IsNullOrWhiteSpace(value) Then StringToLen(value, dVal)
|
||||
' If Math.Abs(dVal - m_dSideHeel) > EPS_SMALL Then
|
||||
' ' Verifico stia nei limiti
|
||||
' If dVal < 0 Then
|
||||
' m_dSideHeel = 0
|
||||
' NotifyPropertyChanged("GrphSideHeel")
|
||||
' Else
|
||||
' m_dSideHeel = dVal
|
||||
' End If
|
||||
' ' Lo modifico nella geometria e nella lista inclinazioni
|
||||
' m_ModifySideHeel(sEntityName, dSideHeel)
|
||||
' ' Aggiorno tutti i testi
|
||||
' m_RefreshSideAngleText()
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
'Public Property dSideHeel As Double
|
||||
' Get
|
||||
' Return m_dSideHeel
|
||||
' End Get
|
||||
' Set(value As Double)
|
||||
' ' Verifico stia nei limiti
|
||||
' If value < 0 Then
|
||||
' m_dSideHeel = 0
|
||||
' Else
|
||||
' m_dSideHeel = value
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Public Overrides Property bIsChecked As Boolean
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
'If value Then
|
||||
' m_dSideAngle = m_Parameter1
|
||||
' m_dSideHeel = m_Parameter2
|
||||
'Else
|
||||
' m_dSideAngle = 0
|
||||
' m_dSideHeel = 0
|
||||
'End If
|
||||
'' '' Converto nome checkbox in nome elemento tenendo conto dello slittamento verso il basso
|
||||
'''Dim nCurrSide As Integer = m_SideAngleEntityList.Count() - (10 - CInt(CurrCheckBox.Name.Substring(1)))
|
||||
'''Dim sCurrSide As String = "A" & nCurrSide.ToString()
|
||||
'' Lo modifico nella geometria e nella lista inclinazioni
|
||||
'm_ModifySideAngle(sEntityName, m_dSideAngle)
|
||||
'm_ModifySideHeel(sEntityName, m_dSideHeel)
|
||||
'' Aggiorno tutti i testi
|
||||
'm_RefreshSideAngleText()
|
||||
NotifyPropertyChanged("bIsChecked")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Type As SideEntityControlVM.ModeAlzAndFront = SideEntityControlVM.ModeAlzAndFront.NONE
|
||||
Public Property Type As SideEntityControlVM.ModeAlzAndFront
|
||||
Get
|
||||
Return m_Type
|
||||
End Get
|
||||
Set(value As SideEntityControlVM.ModeAlzAndFront)
|
||||
m_Type = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, Mode As SideEntityControlVM.ModeOpt)
|
||||
MyBase.New(nId, sEntityName, nTextId, Mode)
|
||||
'm_dSideAngle = dSideAngle
|
||||
'm_dSideHeel = dSideHeel
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -215,22 +215,19 @@ Public Class TopCommandBarVM
|
||||
''' Returns a command that do SaveAs.
|
||||
''' </summary>
|
||||
Public ReadOnly Property SaveAsCommand As ICommand
|
||||
Get
|
||||
If m_cmdSaveAs Is Nothing Then
|
||||
m_cmdSaveAs = New Command(AddressOf SaveAs)
|
||||
End If
|
||||
Return m_cmdSaveAs
|
||||
End Get
|
||||
Get
|
||||
If m_cmdSaveAs Is Nothing Then
|
||||
m_cmdSaveAs = New Command(AddressOf SaveAs)
|
||||
End If
|
||||
Return m_cmdSaveAs
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the SaveAs. This method is invoked by the SaveAsCommand.
|
||||
''' </summary>
|
||||
Public Sub SaveAs(ByVal param As Object)
|
||||
' non posso avere la stessa lastra in due progetti
|
||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
||||
Return
|
||||
End If
|
||||
' non posso avere la stessa lastra in due progetti -> gestita da DataBase
|
||||
OmagOFFICEMap.refSceneHostVM.SaveAsProject()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Public Class UnderDrillControlVM
|
||||
Private m_dDrillDepth As Double
|
||||
Public Property dDrillDepth As String
|
||||
Get
|
||||
Return LenToString(m_dDrillDepth, -2)
|
||||
Return LenToString(m_dDrillDepth, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLen(value, m_dDrillDepth)
|
||||
|
||||
@@ -248,7 +248,7 @@ Module OmagOFFICEMap
|
||||
Not IsNothing(m_refOptionPanelVM) AndAlso Not IsNothing(m_refRawPartTabVM) AndAlso
|
||||
Not IsNothing(m_refNestingTabVM) AndAlso Not IsNothing(m_refSimulTabVM) AndAlso
|
||||
Not IsNothing(m_refMachiningTabVM) AndAlso
|
||||
LibMap.EndInit() AndAlso PhotoMap.ContninueApplication
|
||||
LibMap.EndInit() AndAlso PhotoMap.ContinueApplication
|
||||
End Function
|
||||
|
||||
#End Region ' Init
|
||||
|
||||
Reference in New Issue
Block a user