- aggiunto FeedIncrement

- migliorata gestione colore sfondo con wait
This commit is contained in:
Emmanuele Sassi
2022-12-27 13:37:21 +01:00
parent 05864bcac5
commit 60758454ed
2 changed files with 71 additions and 4 deletions
+16
View File
@@ -88,6 +88,22 @@
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="Increment:"
Visibility="{Binding FeedIncrement_Visibility}"
Margin="2.5,0,2.5,0"
Style="{StaticResource TSFEditor_TextBlock}"/>
<TextBox Grid.Column="1"
Text="{Binding sFeedIncrement}"
Width="50"
Visibility="{Binding FeedIncrement_Visibility}"
Margin="2.5,0,2.5,0"
Style="{StaticResource ControllerInputPanel_TextBox}"/>
</Grid>
<StackPanel Grid.Column="1"
Orientation="Horizontal">
<Button Content="Set"
+55 -4
View File
@@ -17,6 +17,7 @@ Public Class TFSEditorVM
SECTIONCHANGE = 2
SELECTION = 3
SELECTION_WAIT = 4
FEED_INCREMENT = 5
End Enum
Public Enum Filters As Integer
@@ -59,7 +60,7 @@ Public Class TFSEditorVM
End Set
End Property
Private m_MediaTypeList As New List(Of String)({"Slice Number", "Section change", "Selection", "Selection Wait"})
Private m_MediaTypeList As New List(Of String)({"Slice Number", "Section change", "Selection", "Selection Wait", "Feed Increment"})
Public ReadOnly Property MediaTypeList As List(Of String)
Get
Return m_MediaTypeList
@@ -79,6 +80,7 @@ Public Class TFSEditorVM
SetFCurrVisibility(False)
SetDifference_Visibility(False)
SetWaitVisibility(False)
SetFeedIncrementVisibility(False)
SetSetVisibility(False)
SetMediaVisibility(True)
Case MediaTypes.SECTIONCHANGE
@@ -86,6 +88,7 @@ Public Class TFSEditorVM
SetFCurrVisibility(False)
SetDifference_Visibility(True)
SetWaitVisibility(False)
SetFeedIncrementVisibility(False)
SetSetVisibility(False)
SetMediaVisibility(True)
Case MediaTypes.SELECTION
@@ -93,6 +96,7 @@ Public Class TFSEditorVM
SetFCurrVisibility(True)
SetDifference_Visibility(False)
SetWaitVisibility(False)
SetFeedIncrementVisibility(False)
SetSetVisibility(True)
SetMediaVisibility(True)
Case MediaTypes.SELECTION_WAIT
@@ -100,6 +104,15 @@ Public Class TFSEditorVM
SetFCurrVisibility(False)
SetDifference_Visibility(False)
SetWaitVisibility(True)
SetFeedIncrementVisibility(False)
SetSetVisibility(True)
SetMediaVisibility(False)
Case MediaTypes.FEED_INCREMENT
SetMediaHeightVisibility(False)
SetFCurrVisibility(False)
SetDifference_Visibility(False)
SetWaitVisibility(False)
SetFeedIncrementVisibility(True)
SetSetVisibility(True)
SetMediaVisibility(False)
End Select
@@ -210,6 +223,32 @@ Public Class TFSEditorVM
NotifyPropertyChanged(NameOf(Wait_Visibility))
End Sub
Private m_dFeedIncrement As Double
Public Property sFeedIncrement As String
Get
Return DoubleToString(m_dFeedIncrement, 0)
End Get
Set(value As String)
Dim nNewValue As Integer = 0
If StringToLen(value, nNewValue) Then
m_dFeedIncrement = nNewValue
Else
NotifyPropertyChanged(NameOf(sFeedIncrement))
End If
End Set
End Property
Private m_FeedIncrement_Visibility As Visibility = Visibility.Collapsed
Public ReadOnly Property FeedIncrement_Visibility As Visibility
Get
Return m_FeedIncrement_Visibility
End Get
End Property
Private Sub SetFeedIncrementVisibility(bValue As Boolean)
m_FeedIncrement_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(FeedIncrement_Visibility))
End Sub
Private m_Media_Visibility As Visibility = Visibility.Visible
Public ReadOnly Property Media_Visibility As Visibility
Get
@@ -286,6 +325,10 @@ Public Class TFSEditorVM
Else
EgtRemoveInfo(nLayTFSCalcId, KEY_EMITWAITINGTIME)
End If
' aggiorno background di tutte le righe
For Each Layer In m_LayerList
Layer.NotifyPropertyChanged(NameOf(Layer.Background))
Next
NotifyPropertyChanged(NameOf(ColWait_Visibility))
End Set
End Property
@@ -423,6 +466,10 @@ Public Class TFSEditorVM
For Each Layer In m_SelLayers
Layer.SetTWait(m_dWait)
Next
Case MediaTypes.FEED_INCREMENT
For Each Layer In m_SelLayers
Layer.SetFCurr(Layer.dFCurr * (m_dFeedIncrement / 100))
Next
End Select
'' salvo selezione corrente
'Dim SelIndexList As New List(Of Integer)
@@ -749,6 +796,11 @@ Public Class TFSLayer
NotifyPropertyChanged(NameOf(Background))
NotifyPropertyChanged(NameOf(sFCurr))
End Sub
Public ReadOnly Property dFCurr As Double
Get
Return m_dFCurr
End Get
End Property
Private m_bFCurr_IsModified As Boolean
Public ReadOnly Property bFCurr_IsModified As Boolean
@@ -780,11 +832,10 @@ Public Class TFSLayer
Get
If m_bFCurr_IsModified OrElse m_bTWait_IsModified Then
Return Brushes.White
ElseIf m_dTCurr < m_dTMin Then
ElseIf (Not Map.refTFSEditorVM.bWaitingTime AndAlso m_dTCurr + 1 < m_dTMin) OrElse (Map.refTFSEditorVM.bWaitingTime AndAlso m_dTCurr + m_dTWait + 1 < m_dTMin) Then
Return Brushes.Red
ElseIf m_dTCurr > m_dTMax Then
ElseIf m_dTCurr - 1 > m_dTMax Then
Return Brushes.MediumOrchid
' Return Brushes.MediumSlateBlue
Else
Return Brushes.LightGreen
End If