- aggiunta gestione dis/attivazione wait
- aggiunta modifica con selezione dei tempi wait
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
Public Const KEY_SPEED = "Speed"
|
||||
Public Const KEY_SLICEID = "SliceId"
|
||||
Public Const KEY_MASS = "PrintMass"
|
||||
Public Const KEY_EMITWAITINGTIME = "EmitWaitingTime"
|
||||
|
||||
|
||||
' parametri Materiali
|
||||
|
||||
@@ -72,15 +72,32 @@
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource ControllerInputPanel_TextBox}"/>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Wait:"
|
||||
Visibility="{Binding Wait_Visibility}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource TSFEditor_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding sWait}"
|
||||
Width="50"
|
||||
Visibility="{Binding Wait_Visibility}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource ControllerInputPanel_TextBox}"/>
|
||||
</Grid>
|
||||
<StackPanel Grid.Column="1"
|
||||
Orientation="Horizontal">
|
||||
<Button Content="Set"
|
||||
Command="{Binding Set_Command}"
|
||||
Visibility="{Binding FCurr_Visibility}"
|
||||
Visibility="{Binding Set_Visibility}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource ToolBar_TextButton}"/>
|
||||
<Button Content="Media"
|
||||
Command="{Binding Media_Command}"
|
||||
Visibility="{Binding Media_Visibility}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource ToolBar_TextButton}"/>
|
||||
<Button Content="Reset"
|
||||
@@ -135,6 +152,8 @@
|
||||
Width="1*"/>
|
||||
<DataGridTextColumn Header="TWait"
|
||||
Binding="{Binding sTWait}"
|
||||
Visibility="{Binding DataContext.ColWait_Visibility,
|
||||
Source={x:Reference TFSEditorStackPanel}}"
|
||||
Width="1*"/>
|
||||
<DataGridTextColumn Header="FMin"
|
||||
Binding="{Binding sFMin}"
|
||||
@@ -181,6 +200,9 @@
|
||||
Command="{Binding Extend_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource ToolBar_TextButton}"/>
|
||||
<CheckBox Content="Wait"
|
||||
IsChecked="{Binding bWaitingTime}"
|
||||
VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -16,6 +16,7 @@ Public Class TFSEditorVM
|
||||
HEIGHT = 1
|
||||
SECTIONCHANGE = 2
|
||||
SELECTION = 3
|
||||
SELECTION_WAIT = 4
|
||||
End Enum
|
||||
|
||||
Public Enum Filters As Integer
|
||||
@@ -58,7 +59,7 @@ Public Class TFSEditorVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_MediaTypeList As New List(Of String)({"Slice Number", "Section change", "Selection"})
|
||||
Private m_MediaTypeList As New List(Of String)({"Slice Number", "Section change", "Selection", "Selection Wait"})
|
||||
Public ReadOnly Property MediaTypeList As List(Of String)
|
||||
Get
|
||||
Return m_MediaTypeList
|
||||
@@ -77,14 +78,30 @@ Public Class TFSEditorVM
|
||||
SetMediaHeightVisibility(True)
|
||||
SetFCurrVisibility(False)
|
||||
SetDifference_Visibility(False)
|
||||
SetWaitVisibility(False)
|
||||
SetSetVisibility(False)
|
||||
SetMediaVisibility(True)
|
||||
Case MediaTypes.SECTIONCHANGE
|
||||
SetMediaHeightVisibility(False)
|
||||
SetFCurrVisibility(False)
|
||||
SetDifference_Visibility(True)
|
||||
SetWaitVisibility(False)
|
||||
SetSetVisibility(False)
|
||||
SetMediaVisibility(True)
|
||||
Case MediaTypes.SELECTION
|
||||
SetMediaHeightVisibility(False)
|
||||
SetFCurrVisibility(True)
|
||||
SetDifference_Visibility(False)
|
||||
SetWaitVisibility(False)
|
||||
SetSetVisibility(True)
|
||||
SetMediaVisibility(True)
|
||||
Case MediaTypes.SELECTION_WAIT
|
||||
SetMediaHeightVisibility(False)
|
||||
SetFCurrVisibility(False)
|
||||
SetDifference_Visibility(False)
|
||||
SetWaitVisibility(True)
|
||||
SetSetVisibility(True)
|
||||
SetMediaVisibility(False)
|
||||
End Select
|
||||
End Set
|
||||
End Property
|
||||
@@ -167,6 +184,54 @@ Public Class TFSEditorVM
|
||||
NotifyPropertyChanged(NameOf(FCurr_Visibility))
|
||||
End Sub
|
||||
|
||||
Private m_dWait As Double
|
||||
Public Property sWait As String
|
||||
Get
|
||||
Return LenToString(m_dWait, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim nNewValue As Integer = 0
|
||||
If StringToLen(value, nNewValue) Then
|
||||
m_dWait = nNewValue
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sWait))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Wait_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property Wait_Visibility As Visibility
|
||||
Get
|
||||
Return m_Wait_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Private Sub SetWaitVisibility(bValue As Boolean)
|
||||
m_Wait_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(Wait_Visibility))
|
||||
End Sub
|
||||
|
||||
Private m_Media_Visibility As Visibility = Visibility.Visible
|
||||
Public ReadOnly Property Media_Visibility As Visibility
|
||||
Get
|
||||
Return m_Media_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Private Sub SetMediaVisibility(bValue As Boolean)
|
||||
m_Media_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(Media_Visibility))
|
||||
End Sub
|
||||
|
||||
Private m_Set_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property Set_Visibility As Visibility
|
||||
Get
|
||||
Return m_Set_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Private Sub SetSetVisibility(bValue As Boolean)
|
||||
m_Set_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(Set_Visibility))
|
||||
End Sub
|
||||
|
||||
Private m_FilterList As New List(Of String)({"", "Time Lower", "Time Ok", "Time Upper", "Speed Min", "Speed Max"})
|
||||
Public ReadOnly Property FilterList As List(Of String)
|
||||
Get
|
||||
@@ -208,6 +273,28 @@ Public Class TFSEditorVM
|
||||
NotifyPropertyChanged(NameOf(bTFSEditor_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Private m_bWaitingTime As Boolean = False
|
||||
Public Property bWaitingTime As Boolean
|
||||
Get
|
||||
Return m_bWaitingTime
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bWaitingTime = value
|
||||
Dim nLayTFSCalcId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, LAY_TFSCALC)
|
||||
If m_bWaitingTime Then
|
||||
EgtSetInfo(nLayTFSCalcId, KEY_EMITWAITINGTIME, True)
|
||||
Else
|
||||
EgtRemoveInfo(nLayTFSCalcId, KEY_EMITWAITINGTIME)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(ColWait_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property ColWait_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_bWaitingTime, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdSet As ICommand
|
||||
Private m_cmdMedia As ICommand
|
||||
@@ -332,12 +419,16 @@ Public Class TFSEditorVM
|
||||
For Each Layer In m_SelLayers
|
||||
Layer.SetFCurr(m_dFCurr)
|
||||
Next
|
||||
Case MediaTypes.SELECTION_WAIT
|
||||
For Each Layer In m_SelLayers
|
||||
Layer.SetTWait(m_dWait)
|
||||
Next
|
||||
End Select
|
||||
' salvo selezione corrente
|
||||
Dim SelIndexList As New List(Of Integer)
|
||||
For Each SelLayer In m_SelLayers
|
||||
SelIndexList.Add(SelLayer.nIndex)
|
||||
Next
|
||||
'' salvo selezione corrente
|
||||
'Dim SelIndexList As New List(Of Integer)
|
||||
'For Each SelLayer In m_SelLayers
|
||||
' SelIndexList.Add(SelLayer.nIndex)
|
||||
'Next
|
||||
'' ricalcolo valori
|
||||
'Map.refSliceManagerVM.CalcSlice(False, True)
|
||||
'' ripristino layer selezionati
|
||||
|
||||
Reference in New Issue
Block a user