- continuazione implementazione L250
This commit is contained in:
@@ -312,7 +312,25 @@ Public Class BTLFeatureVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Edit_Visibility As Visibility
|
||||
Get
|
||||
Return Visibility.Collapsed 'If(BTLFeatureM.IsFreeContour AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SaveCancel_Visibility As Visibility
|
||||
Get
|
||||
Return Visibility.Collapsed 'If(BTLFeatureM.IsFreeContour AndAlso Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub RefreshFCMBtnVisibility()
|
||||
NotifyPropertyChanged(NameOf(Edit_Visibility))
|
||||
NotifyPropertyChanged(NameOf(SaveCancel_Visibility))
|
||||
End Sub
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdEdit As ICommand
|
||||
Private m_cmdSave As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
Private m_cmdDeleteFeature As ICommand
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
@@ -493,6 +511,60 @@ Public Class BTLFeatureVM
|
||||
|
||||
#End Region ' DeleteFeature
|
||||
|
||||
#Region "Edit"
|
||||
|
||||
Public ReadOnly Property Edit_Command As ICommand
|
||||
Get
|
||||
If m_cmdEdit Is Nothing Then
|
||||
m_cmdEdit = New Command(AddressOf Edit)
|
||||
End If
|
||||
Return m_cmdEdit
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Edit()
|
||||
' attivo modalita' contorno libero
|
||||
Map.refFreeContourManagerVM.Open()
|
||||
End Sub
|
||||
|
||||
#End Region ' Edit
|
||||
|
||||
#Region "Save"
|
||||
|
||||
Public ReadOnly Property Save_Command As ICommand
|
||||
Get
|
||||
If m_cmdSave Is Nothing Then
|
||||
m_cmdSave = New Command(AddressOf Save)
|
||||
End If
|
||||
Return m_cmdSave
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Save()
|
||||
' disattivo modalita' contorno libero
|
||||
Map.refFreeContourManagerVM.Close(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' Save
|
||||
|
||||
#Region "Cancel"
|
||||
|
||||
Public ReadOnly Property Cancel_Command As ICommand
|
||||
Get
|
||||
If m_cmdCancel Is Nothing Then
|
||||
m_cmdCancel = New Command(AddressOf Cancel)
|
||||
End If
|
||||
Return m_cmdCancel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Cancel()
|
||||
' disattivo modalita' contorno libero
|
||||
Map.refFreeContourManagerVM.Close(False)
|
||||
End Sub
|
||||
|
||||
#End Region ' Cancel
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
@@ -56,7 +56,7 @@ Public Class BTLPartVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Function SetBtlLHW( dBtlL As Double, dBtlH As Double, dBtlW As Double) As Boolean
|
||||
Private Function SetBtlLHW(dBtlL As Double, dBtlH As Double, dBtlW As Double) As Boolean
|
||||
Dim OldSection As SectionXMaterial = Section
|
||||
' verifico se ci sono già copie in grezzi
|
||||
Dim nDuploCount As Integer = 0
|
||||
@@ -95,10 +95,10 @@ Public Class BTLPartVM
|
||||
Public Property sL As String
|
||||
Get
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame( nPartId, frBeam)
|
||||
If IsX( frBeam.VersX(), EPS_SMALL) Then
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsX(frBeam.VersX(), EPS_SMALL) Then
|
||||
Return LenToString(m_BTLPartM.dBtlL, 3)
|
||||
ElseIf IsX( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsX(frBeam.VersY(), EPS_SMALL) Then
|
||||
Return LenToString(m_BTLPartM.dBtlH, 3)
|
||||
Else
|
||||
Return LenToString(m_BTLPartM.dBtlW, 3)
|
||||
@@ -111,15 +111,15 @@ Public Class BTLPartVM
|
||||
Dim dBtlW = m_BTLPartM.dBtlW
|
||||
Dim dBtlH = m_BTLPartM.dBtlH
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame( nPartId, frBeam)
|
||||
If IsX( frBeam.VersX(), EPS_SMALL) Then
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsX(frBeam.VersX(), EPS_SMALL) Then
|
||||
dBtlL = dVal
|
||||
ElseIf IsX( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsX(frBeam.VersY(), EPS_SMALL) Then
|
||||
dBtlH = dVal
|
||||
Else
|
||||
dBtlW = dVal
|
||||
End If
|
||||
SetBtlLHW( dBtlL, dBtlH, dBtlW)
|
||||
SetBtlLHW(dBtlL, dBtlH, dBtlW)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sL))
|
||||
NotifyPropertyChanged(NameOf(sH))
|
||||
@@ -129,10 +129,10 @@ Public Class BTLPartVM
|
||||
Public ReadOnly Property dL As Double
|
||||
Get
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame( nPartId, frBeam)
|
||||
If IsX( frBeam.VersX(), EPS_SMALL) Then
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsX(frBeam.VersX(), EPS_SMALL) Then
|
||||
Return m_BTLPartM.dBtlL
|
||||
ElseIf IsX( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsX(frBeam.VersY(), EPS_SMALL) Then
|
||||
Return m_BTLPartM.dBtlH
|
||||
Else
|
||||
Return m_BTLPartM.dBtlW
|
||||
@@ -148,10 +148,10 @@ Public Class BTLPartVM
|
||||
Public Property sW As String
|
||||
Get
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame( nPartId, frBeam)
|
||||
If IsY( frBeam.VersX(), EPS_SMALL) Then
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsY(frBeam.VersX(), EPS_SMALL) Then
|
||||
Return LenToString(m_BTLPartM.dBtlL, 3)
|
||||
ElseIf IsY( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsY(frBeam.VersY(), EPS_SMALL) Then
|
||||
Return LenToString(m_BTLPartM.dBtlH, 3)
|
||||
Else
|
||||
Return LenToString(m_BTLPartM.dBtlW, 3)
|
||||
@@ -164,15 +164,15 @@ Public Class BTLPartVM
|
||||
Dim dBtlW = m_BTLPartM.dBtlW
|
||||
Dim dBtlH = m_BTLPartM.dBtlH
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame( nPartId, frBeam)
|
||||
If IsY( frBeam.VersX(), EPS_SMALL) Then
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsY(frBeam.VersX(), EPS_SMALL) Then
|
||||
dBtlL = dVal
|
||||
ElseIf IsY( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsY(frBeam.VersY(), EPS_SMALL) Then
|
||||
dBtlH = dVal
|
||||
Else
|
||||
dBtlW = dVal
|
||||
End If
|
||||
SetBtlLHW( dBtlL, dBtlH, dBtlW)
|
||||
SetBtlLHW(dBtlL, dBtlH, dBtlW)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sL))
|
||||
NotifyPropertyChanged(NameOf(sH))
|
||||
@@ -182,10 +182,10 @@ Public Class BTLPartVM
|
||||
Public ReadOnly Property dW As Double
|
||||
Get
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame( nPartId, frBeam)
|
||||
If IsY( frBeam.VersX(), EPS_SMALL) Then
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsY(frBeam.VersX(), EPS_SMALL) Then
|
||||
Return m_BTLPartM.dBtlL
|
||||
ElseIf IsY( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsY(frBeam.VersY(), EPS_SMALL) Then
|
||||
Return m_BTLPartM.dBtlH
|
||||
Else
|
||||
Return m_BTLPartM.dBtlW
|
||||
@@ -201,10 +201,10 @@ Public Class BTLPartVM
|
||||
Public Property sH As String
|
||||
Get
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame( nPartId, frBeam)
|
||||
If IsZ( frBeam.VersX(), EPS_SMALL) Then
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsZ(frBeam.VersX(), EPS_SMALL) Then
|
||||
Return LenToString(m_BTLPartM.dBtlL, 3)
|
||||
ElseIf IsZ( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsZ(frBeam.VersY(), EPS_SMALL) Then
|
||||
Return LenToString(m_BTLPartM.dBtlH, 3)
|
||||
Else
|
||||
Return LenToString(m_BTLPartM.dBtlW, 3)
|
||||
@@ -217,15 +217,15 @@ Public Class BTLPartVM
|
||||
Dim dBtlW = m_BTLPartM.dBtlW
|
||||
Dim dBtlH = m_BTLPartM.dBtlH
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame( nPartId, frBeam)
|
||||
If IsZ( frBeam.VersX(), EPS_SMALL) Then
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsZ(frBeam.VersX(), EPS_SMALL) Then
|
||||
dBtlL = dVal
|
||||
ElseIf IsZ( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsZ(frBeam.VersY(), EPS_SMALL) Then
|
||||
dBtlH = dVal
|
||||
Else
|
||||
dBtlW = dVal
|
||||
End If
|
||||
SetBtlLHW( dBtlL, dBtlH, dBtlW)
|
||||
SetBtlLHW(dBtlL, dBtlH, dBtlW)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sL))
|
||||
NotifyPropertyChanged(NameOf(sH))
|
||||
@@ -235,10 +235,10 @@ Public Class BTLPartVM
|
||||
Public ReadOnly Property dH As Double
|
||||
Get
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame( nPartId, frBeam)
|
||||
If IsZ( frBeam.VersX(), EPS_SMALL) Then
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsZ(frBeam.VersX(), EPS_SMALL) Then
|
||||
Return m_BTLPartM.dBtlL
|
||||
ElseIf IsZ( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsZ(frBeam.VersY(), EPS_SMALL) Then
|
||||
Return m_BTLPartM.dBtlH
|
||||
Else
|
||||
Return m_BTLPartM.dBtlW
|
||||
@@ -1162,32 +1162,32 @@ Public Class BTLPartVM
|
||||
Public ReadOnly Property Section As SectionXMaterial
|
||||
Get
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame( nPartId, frBeam)
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
Dim dL As Double
|
||||
If IsX( frBeam.VersX(), EPS_SMALL) Then
|
||||
If IsX(frBeam.VersX(), EPS_SMALL) Then
|
||||
dL = m_BTLPartM.dBtlL
|
||||
ElseIf IsX( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsX(frBeam.VersY(), EPS_SMALL) Then
|
||||
dL = m_BTLPartM.dBtlH
|
||||
Else
|
||||
dL = m_BTLPartM.dBtlW
|
||||
End If
|
||||
Dim dW As Double
|
||||
If IsY( frBeam.VersX(), EPS_SMALL) Then
|
||||
If IsY(frBeam.VersX(), EPS_SMALL) Then
|
||||
dW = m_BTLPartM.dBtlL
|
||||
ElseIf IsY( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsY(frBeam.VersY(), EPS_SMALL) Then
|
||||
dW = m_BTLPartM.dBtlH
|
||||
Else
|
||||
dW = m_BTLPartM.dBtlW
|
||||
End If
|
||||
Dim dH As Double
|
||||
If IsZ( frBeam.VersX(), EPS_SMALL) Then
|
||||
If IsZ(frBeam.VersX(), EPS_SMALL) Then
|
||||
dH = m_BTLPartM.dBtlL
|
||||
ElseIf IsZ( frBeam.VersY(), EPS_SMALL) Then
|
||||
ElseIf IsZ(frBeam.VersY(), EPS_SMALL) Then
|
||||
dH = m_BTLPartM.dBtlH
|
||||
Else
|
||||
dH = m_BTLPartM.dBtlW
|
||||
End If
|
||||
Return New SectionXMaterial( dW, dH, dL, m_BTLPartM.sMATERIAL)
|
||||
Return New SectionXMaterial(dW, dH, dL, m_BTLPartM.sMATERIAL)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -1228,12 +1228,8 @@ Public Class BTLPartVM
|
||||
Return m_SelBTLFeatureVM
|
||||
End Get
|
||||
Set(value As BTLFeatureVM)
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW And Not IsNothing(m_SelBTLFeatureVM) AndAlso m_SelBTLFeatureVM.BTLFeatureM.IsFreeContour() Then
|
||||
' disattivo modalita' contorno libero
|
||||
Map.refFreeContourManagerVM.Close()
|
||||
End If
|
||||
m_SelBTLFeatureVM = value
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
If Not IsNothing(m_SelBTLFeatureVM) Then
|
||||
DirectCast(m_SelBTLFeatureVM, BTLFeatureVM).SelGeomFeature()
|
||||
EgtDraw()
|
||||
@@ -1243,11 +1239,8 @@ Public Class BTLPartVM
|
||||
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.FEATURE)
|
||||
' deseleziono i parametri
|
||||
If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing
|
||||
' se contorno libero
|
||||
If m_SelBTLFeatureVM.BTLFeatureM.IsFreeContour() Then
|
||||
' attivo modalita' contorno libero
|
||||
Map.refFreeContourManagerVM.Open()
|
||||
End If
|
||||
' rinfresco bottoni freecontour
|
||||
m_SelBTLFeatureVM.RefreshFCMBtnVisibility()
|
||||
Else
|
||||
EgtDeselectAll()
|
||||
End If
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<EgtBEAMWALL:FeatureManagerV DataContext="{Binding Tag.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"/>
|
||||
<EgtBEAMWALL:FeatureManagerV DataContext="{StaticResource FeatureManagerVM}"
|
||||
Tag="{Binding Tag.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"/>
|
||||
<TabControl Grid.Row="1"
|
||||
TabStripPlacement="Left"
|
||||
Margin="5,5,2.5,5">
|
||||
|
||||
@@ -2,24 +2,33 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer"
|
||||
Orientation="Horizontal"
|
||||
Height="28">
|
||||
|
||||
<TextBlock Text="Face"
|
||||
<TextBlock Text="{Binding Face_Msg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding SIDEList}"
|
||||
SelectedItem="{Binding nSelSIDE}"
|
||||
<ComboBox ItemsSource="{Binding Tag.SIDEList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
SelectedItem="{Binding Tag.nSelSIDE, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<TextBlock Text="Group"
|
||||
<TextBlock Text="{Binding Group_Msg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding GRPList}"
|
||||
SelectedItem="{Binding nSelGRP}"
|
||||
<ComboBox ItemsSource="{Binding Tag.GRPList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
SelectedItem="{Binding Tag.nSelGRP, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
<TextBlock Text="{Binding Tag.sName, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<Button Content="{Binding Edit_Msg}"
|
||||
Command="{Binding Edit_Command}"
|
||||
Visibility="{Binding Edit_Visibility}"
|
||||
Command="{Binding Tag.Edit_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Visibility="{Binding Tag.Edit_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Save_Msg}"
|
||||
Command="{Binding Tag.Save_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Cancel_Msg}"
|
||||
Command="{Binding Tag.Cancel_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -1,3 +1,39 @@
|
||||
Public Class FeatureManagerVM
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class FeatureManagerVM
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Face_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61824)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Group_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61825)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Edit_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61826)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Save_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61827)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Cancel_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61828)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
End Class
|
||||
|
||||
@@ -5,6 +5,19 @@
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
|
||||
|
||||
<RadioButton Content="1"
|
||||
IsChecked="{Binding bIsOneContour}"
|
||||
GroupName="ContourNumber"
|
||||
ToolTip="{Binding Line2PToolTip}"
|
||||
Style="{StaticResource ToolBar_TextToggleButton}">
|
||||
<!--<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>-->
|
||||
</RadioButton>
|
||||
<RadioButton Content="2"
|
||||
GroupName="ContourNumber"
|
||||
ToolTip="{Binding Line2PToolTip}"
|
||||
Style="{StaticResource ToolBar_TextToggleButton}">
|
||||
<!--<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>-->
|
||||
</RadioButton>
|
||||
<Button Command="{Binding Line2PCommand}"
|
||||
ToolTip="{Binding Line2PToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class FreeContourManagerVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
@@ -11,6 +12,25 @@ Public Class FreeContourManagerVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bIsOneContour As Boolean = True
|
||||
Public Property bIsOneContour As Boolean
|
||||
Get
|
||||
Return m_bIsOneContour
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsOneContour = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim SelPart As BTLPartVM
|
||||
Dim SelFeature As BTLFeatureVM
|
||||
Dim nSelPartId As Integer
|
||||
Dim nSelFeatureId As Integer
|
||||
Dim nProcessingLayerId As Integer
|
||||
Dim nAuxId As Integer = 0
|
||||
Dim nOrigPathId As Integer
|
||||
Dim nNewPathId As Integer
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdLine2P As ICommand
|
||||
Private m_cmdModifyCurve As ICommand
|
||||
@@ -37,67 +57,72 @@ Public Class FreeContourManagerVM
|
||||
|
||||
Friend Sub Open()
|
||||
m_bIsActive = True
|
||||
' imposto Part/Feature/Layer Processing ...
|
||||
SelPart = Map.refProjectVM.BTLStructureVM.SelBTLPart
|
||||
SelFeature = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM
|
||||
nSelPartId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId
|
||||
nSelFeatureId = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nFeatureId
|
||||
nProcessingLayerId = EgtGetFirstNameInGroup(nSelPartId, PROCESSINGS)
|
||||
EgtGetInfo(nSelFeatureId, "AUXID", nAuxId)
|
||||
nOrigPathId = nSelFeatureId + nAuxId
|
||||
' attivo bottoni save e cancel
|
||||
SelFeature.RefreshFCMBtnVisibility()
|
||||
' attivo pannello
|
||||
Map.refProjectVM.SetFreeContourManager_Visibility(True)
|
||||
' attivo modifiche su scena
|
||||
Map.refSceneHostVM.MainScene.ResetStatus()
|
||||
' imposto layer corrente
|
||||
Dim nSelPartId As Integer = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId
|
||||
Dim nSelFeatureId As Integer = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nFeatureId
|
||||
Dim nProcessingLayerId As Integer = EgtGetFirstNameInGroup(nSelPartId, PROCESSINGS)
|
||||
' imposto layer corrente per disegno
|
||||
EgtSetCurrPartLayer(nSelPartId, nProcessingLayerId)
|
||||
' nascondo tutte le altre feature
|
||||
' nascondo tutte le feature
|
||||
Dim nTempFeatureId As Integer = EgtGetFirstInGroup(nProcessingLayerId)
|
||||
While nTempFeatureId <> GDB_ID.NULL
|
||||
'' verifico che sia una feature
|
||||
'Dim nGRP As Integer
|
||||
'If EgtGetInfo(nTempFeatureId, BTL_FTR_GRP, nGRP) Then
|
||||
|
||||
'End If
|
||||
'If nTempFeatureId <> nSelFeatureId Then
|
||||
EgtSetMode(nTempFeatureId, GDB_MD.HIDDEN)
|
||||
'End If
|
||||
nTempFeatureId = EgtGetNext(nTempFeatureId)
|
||||
End While
|
||||
' nascondo outline
|
||||
Dim nOutlineLayerId As Integer = EgtGetFirstNameInGroup(nSelPartId, "Outline")
|
||||
' nascondo tutti gli outline
|
||||
Dim nOutlineLayerId As Integer = EgtGetFirstNameInGroup(nSelPartId, OUTLINE)
|
||||
Dim nTempOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayerId)
|
||||
While nTempOutlineId <> GDB_ID.NULL
|
||||
EgtSetMode(nTempOutlineId, GDB_MD.HIDDEN)
|
||||
nTempOutlineId = EgtGetNext(nTempOutlineId)
|
||||
End While
|
||||
' seleziono percorso della feature
|
||||
' deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
Dim nAuxId As Integer = 0
|
||||
EgtGetInfo(nSelFeatureId, "AUXID", nAuxId)
|
||||
Dim nPathId As Integer = nSelFeatureId + nAuxId
|
||||
EgtSetMode(nPathId, GDB_MD.STD)
|
||||
EgtSelectObj(nPathId)
|
||||
' faccio copia del percorso feature
|
||||
nNewPathId = EgtCopyGlob(nOrigPathId, nSelFeatureId, GDB_POS.AFTER)
|
||||
' rendo visibile e seleziono solo percorso feature
|
||||
EgtSetMode(nNewPathId, GDB_MD.STD)
|
||||
EgtSelectObj(nNewPathId)
|
||||
' imposto filtro selezione solo su curve
|
||||
Map.refSceneHostVM.MainScene.SetObjFilterForSel(False, True, False, False, False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend Sub Close()
|
||||
m_bIsActive = True
|
||||
Friend Sub Close(bSave As Boolean)
|
||||
If m_bIsActive Then
|
||||
m_bIsActive = False
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
' gestisco salvataggio
|
||||
If bSave Then
|
||||
' cancello vecchio percorso
|
||||
EgtErase(nOrigPathId)
|
||||
' ricalcolo auxid
|
||||
EgtSetInfo(nSelFeatureId, "AUXID", (nNewPathId - nSelFeatureId).ToString("+#;-#;0"))
|
||||
Else
|
||||
' elimino nuovo percorso
|
||||
EgtErase(nNewPathId)
|
||||
End If
|
||||
' mostro tutte le altre feature
|
||||
Dim nSelPartId As Integer = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId
|
||||
Dim nSelFeatureId As Integer = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nFeatureId
|
||||
Dim nProcessingLayerId As Integer = EgtGetFirstNameInGroup(nSelPartId, PROCESSINGS)
|
||||
Dim nTempFeatureId As Integer = EgtGetFirstInGroup(nProcessingLayerId)
|
||||
While nTempFeatureId <> GDB_ID.NULL
|
||||
'' verifico che sia una feature
|
||||
'Dim nGRP As Integer
|
||||
'If EgtGetInfo(nTempFeatureId, BTL_FTR_GRP, nGRP) Then
|
||||
|
||||
'End If
|
||||
If nTempFeatureId <> nSelFeatureId Then
|
||||
EgtSetMode(nTempFeatureId, GDB_MD.STD)
|
||||
End If
|
||||
nTempFeatureId = EgtGetNext(nTempFeatureId)
|
||||
End While
|
||||
' mostro outline
|
||||
Dim nOutlineLayerId As Integer = EgtGetFirstNameInGroup(nSelPartId, "Outline")
|
||||
Dim nOutlineLayerId As Integer = EgtGetFirstNameInGroup(nSelPartId, OUTLINE)
|
||||
Dim nTempOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayerId)
|
||||
While nTempOutlineId <> GDB_ID.NULL
|
||||
EgtSetMode(nTempOutlineId, GDB_MD.STD)
|
||||
@@ -107,6 +132,14 @@ Public Class FreeContourManagerVM
|
||||
Map.refProjectVM.SetFreeContourManager_Visibility(False)
|
||||
' imposto filtro selezione solo su curve
|
||||
EgtSetObjFilterForSelect(True, True, True, True, True)
|
||||
' attivo bottone edit
|
||||
SelFeature.RefreshFCMBtnVisibility()
|
||||
' resetto tutte le variabili correnti
|
||||
SelPart = Nothing
|
||||
SelFeature = Nothing
|
||||
nSelPartId = GDB_ID.NULL
|
||||
nSelFeatureId = GDB_ID.NULL
|
||||
nProcessingLayerId = GDB_ID.NULL
|
||||
' disattivo modifiche su scena
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
End Sub
|
||||
@@ -229,10 +262,10 @@ Public Class FreeContourManagerVM
|
||||
''' </summary>
|
||||
Public ReadOnly Property ArcFlipCommand As ICommand
|
||||
Get
|
||||
If m_cmdArcFlip Is Nothing Then
|
||||
m_cmdArcFlip = New Command(AddressOf ArcFlip)
|
||||
If m_cmdArcflip Is Nothing Then
|
||||
m_cmdArcflip = New Command(AddressOf ArcFlip)
|
||||
End If
|
||||
Return m_cmdArcFlip
|
||||
Return m_cmdArcflip
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<EgtBEAMWALL:OptimizePanelVM x:Key="OptimizePanelVM"/>
|
||||
<EgtBEAMWALL:FreeContourManagerVM x:Key="FreeContourManagerVM"/>
|
||||
<EgtBEAMWALL:FreeContourInputVM x:Key="FreeContourInputVM"/>
|
||||
<EgtBEAMWALL:FeatureManagerVM x:Key="FeatureManagerVM"/>
|
||||
<!--<OmagOFFICE:VeinMatchPanelVM x:Key="VeinMatchPanelVM"/>
|
||||
<OmagOFFICE:OptionPanelVM x:Key="OptionPanelVM"/>
|
||||
<OmagOFFICE:RawPartTabVM x:Key="RawPartTabVM"/>
|
||||
|
||||
Reference in New Issue
Block a user