aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-06-08 09:37:17 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-06-08 09:37:17 +0300
commit2b1c20945dc03d5136fba48ee9d165b412620e66 (patch)
treefb2b4c9af81076740548706411e893e3764fdcb8 /Software/Visual_Studio/PPC
parent54624e4a90a240ad702995e1ed551901768e131f (diff)
downloadTango-2b1c20945dc03d5136fba48ee9d165b412620e66.tar.gz
Tango-2b1c20945dc03d5136fba48ee9d165b412620e66.zip
PPC. Resize the font and change color for Sensors display values.
Related Work Items: #8551
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs8
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs12
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml48
4 files changed, 43 insertions, 27 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml
index c31c8036d..165f251c3 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml
@@ -1192,7 +1192,7 @@
<Border Grid.Row="2" Margin="0 0 0 0" BorderThickness="0">
<touch:TouchExpander x:Name="summaryExpander" IsExpanded="{Binding IsSummaryOpened, Mode=TwoWay}" Grid.Row="3" Margin="15 0 15 0 " FontSize="{StaticResource TangoTitleFontSize}" BorderThickness="0" Style="{StaticResource TouchRoundedExpander}" CornerRadius="20 20 0 0" Padding="10" IsTabStop="False" >
<touch:TouchExpander.Header>
- <DockPanel Height="84">
+ <DockPanel Height="80">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 10 0" VerticalAlignment="Center" >
<StackPanel Orientation="Horizontal" Visibility="{Binding IsSummaryOpened, Converter={StaticResource BooleanToVisibilityInverseConverter}, Mode=TwoWay}">
<TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" Visibility="{Binding IsWeightView, Converter={StaticResource BooleanToVisibilityInverseConverter}}">
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs
index ded7e33e8..42f6bd180 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs
@@ -17,6 +17,13 @@ namespace Tango.PPC.UI.Models
set { _displayValue = value; RaisePropertyChangedAuto(); }
}
+ private String _displayMaxValue;
+ public String DisplayMaxValue
+ {
+ get { return _displayMaxValue; }
+ set { _displayMaxValue = value; RaisePropertyChangedAuto(); }
+ }
+
private String _status;
public String Status
{
@@ -53,6 +60,7 @@ namespace Tango.PPC.UI.Models
DisplayValue = "--";
Value = 0;
MaxValue = 100;
+ DisplayMaxValue = "";
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
index faddc5c54..beba47246 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
@@ -110,15 +110,17 @@ namespace Tango.PPC.UI.Models
{
item.Status = "Heating Up";
item.Color = Colors.Orange;
- item.DisplayValue = $"{state.CurrentValue.ToString("N1")} / {state.SetPoint}";
+ item.DisplayValue = $"{state.CurrentValue.ToString("N1")}";
+ item.DisplayMaxValue = $"/{state.SetPoint}";
item.MaxValue = state.SetPoint;
item.Value = state.CurrentValue;
}
- else if (state.SetPoint == 0 || (state.CurrentValue >= (state.SetPoint - 10) || state.CurrentValue <= (state.SetPoint + 10)))
+ else if (state.SetPoint == 0 || (state.CurrentValue >= (state.SetPoint - 10) && state.CurrentValue <= (state.SetPoint + 10)))
{
item.Status = "Operational";
item.Color = Colors.Green;
item.DisplayValue = $" {state.SetPoint}";
+ item.DisplayMaxValue = "";
if(state.SetPoint == 0 && state.CurrentValue == 0)
{
item.MaxValue = 10;
@@ -133,7 +135,8 @@ namespace Tango.PPC.UI.Models
{
item.Status = "Over-temperature";
item.Color = Colors.Red;
- item.DisplayValue = $"{state.CurrentValue.ToString("N1")} / {state.SetPoint}";
+ item.DisplayValue = $"{state.CurrentValue.ToString("N1")}";
+ item.DisplayMaxValue = $"/{state.SetPoint}";
item.MaxValue = state.SetPoint;
item.Value = state.CurrentValue > state.SetPoint? state.SetPoint : state.CurrentValue;
}
@@ -142,6 +145,7 @@ namespace Tango.PPC.UI.Models
item.Color = Colors.Gray;
item.MaxValue = 100;
item.Value = 0;
+ item.DisplayMaxValue = "";
}
}
}
@@ -205,8 +209,6 @@ namespace Tango.PPC.UI.Models
Lubricant.DisplayValue = "None";
Lubricant.Color = Colors.Gray;
}
-
-
}
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
index 536682bf9..1445337ad 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
@@ -1021,12 +1021,15 @@
<SolidColorBrush Color="{Binding DryerZone3.Color}"/>
</touch:TouchArcProgress.Foreground>
</touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Bold" Text="{Binding DryerZone3.DisplayValue}">
- <TextBlock.Foreground>
- <SolidColorBrush Color="{Binding DryerZone3.Color}"/>
- </TextBlock.Foreground>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="Bold" >
+ <Run Text="{Binding DryerZone3.DisplayValue}">
+ <Run.Foreground>
+ <SolidColorBrush Color="{Binding DryerZone3.Color}"/>
+ </Run.Foreground>
+ </Run>
+ <Run Text="{Binding DryerZone3.DisplayMaxValue}" ></Run>
</TextBlock>
- <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" >&#186;C</TextBlock>
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoDefaultFontSize}" >&#186;C</TextBlock>
</Grid>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Zone 3</TextBlock>
@@ -1039,12 +1042,12 @@
<SolidColorBrush Color="{Binding DryerAir.Color}"/>
</touch:TouchArcProgress.Foreground>
</touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding DryerAir.DisplayValue}">
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold" Text="{Binding DryerAir.DisplayValue}">
<TextBlock.Foreground>
<SolidColorBrush Color="{Binding DryerAir.Color}"/>
</TextBlock.Foreground>
</TextBlock>
- <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="&#186;C" >
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold" Text="&#186;C" >
</TextBlock>
</Grid>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Air</TextBlock>
@@ -1056,12 +1059,15 @@
<SolidColorBrush Color="{Binding Tunnel.Color}"/>
</touch:TouchArcProgress.Foreground>
</touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding Tunnel.DisplayValue}">
- <TextBlock.Foreground>
- <SolidColorBrush Color="{Binding Tunnel.Color}"/>
- </TextBlock.Foreground>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold" >
+ <Run Text="{Binding Tunnel.DisplayValue}">
+ <Run.Foreground>
+ <SolidColorBrush Color="{Binding Tunnel.Color}"/>
+ </Run.Foreground>
+ </Run>
+ <Run Text="{Binding Tunnel.DisplayMaxValue}" ></Run>
</TextBlock>
- <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="&#186;C"></TextBlock>
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold" Text="&#186;C"></TextBlock>
</Grid>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Tunnel</TextBlock>
@@ -1073,12 +1079,12 @@
<SolidColorBrush Color="{Binding PumpsPressure.Color}"/>
</touch:TouchArcProgress.Foreground>
</touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding PumpsPressure.DisplayValue}">
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold" Text="{Binding PumpsPressure.DisplayValue}">
<TextBlock.Foreground>
<SolidColorBrush Color="{Binding PumpsPressure.Color}"/>
</TextBlock.Foreground>
</TextBlock>
- <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="Bar"></TextBlock>
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold" Text="Bar"></TextBlock>
</Grid>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Pumps pressure</TextBlock>
@@ -1090,12 +1096,12 @@
<SolidColorBrush Color="{Binding Lubricant.Color}"/>
</touch:TouchArcProgress.Foreground>
</touch:TouchArcProgress>
- <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding Lubricant.DisplayValue, StringFormat=0.## }">
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold" Text="{Binding Lubricant.DisplayValue, StringFormat=0.## }">
<TextBlock.Foreground>
<SolidColorBrush Color="{Binding Lubricant.Color}"/>
</TextBlock.Foreground>
</TextBlock>
- <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="mVolts"></TextBlock>
+ <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoDefaultFontSize}" FontWeight="SemiBold" Text="mVolts"></TextBlock>
</Grid>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Lubricant</TextBlock>
@@ -1200,8 +1206,8 @@
</Grid>
</Grid>
</Grid>
- <Grid VerticalAlignment="Bottom" Grid.ColumnSpan="2" Margin="10 0 2 0">
- <touch:TouchExpander x:Name="Notifications" Style="{StaticResource TouchRoundedExpander}" IsTabStop="False" KeyboardNavigation.TabNavigation ="None" BorderThickness="0 0 0 0" CornerRadius="20 20 0 0" Margin="0 0 0 -1" IsExpanded="{Binding IsExpandedNotifications, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
+ <Grid VerticalAlignment="Bottom" Grid.ColumnSpan="2" Margin="10 0 10 0">
+ <touch:TouchExpander x:Name="Notifications" Style="{StaticResource TouchRoundedExpander}" IsTabStop="False" KeyboardNavigation.TabNavigation ="None" BorderThickness="0" CornerRadius="20 20 0 0" Margin="0 0 0 -1" IsExpanded="{Binding IsExpandedNotifications, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<touch:TouchExpander.Header>
<DockPanel >
<touch:TouchButton Margin="0 0 20 0" Content="Clear All" DockPanel.Dock="Right" Width="120" Height="38" HorizontalAlignment="Right" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="1" CornerRadius="19" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" Foreground="{StaticResource TangoPrimaryAccentBrush}" Command="{Binding ClearAllNotificationsCommand}" Visibility="{Binding NotificationProvider.HasNotificationItems, Converter={StaticResource BooleanToVisibilityConverter}}" >
@@ -1244,7 +1250,7 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
- <Grid HorizontalAlignment="Stretch" Height="90">
+ <Grid HorizontalAlignment="Stretch" Height="60">
<Border BorderThickness="1" Margin="-1 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}">
<Grid HorizontalAlignment="Stretch" >
<Grid.ColumnDefinitions>
@@ -1283,8 +1289,8 @@
</touch:TouchIcon>
<StackPanel Margin="15 3 10 5" VerticalAlignment="Center" Grid.Column="1">
- <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Foreground="Black" VerticalAlignment="Center" ></TextBlock>
- <TextBlock Margin="0 5 0 0" Foreground="{StaticResource TangoDarkForegroundBrush}" Text="{Binding ExpandedMessage}" FontSize="{StaticResource TangoSmallFontSize}" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+ <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Foreground="Black" VerticalAlignment="Top" ></TextBlock>
+ <TextBlock Margin="0 3 0 0" Foreground="{StaticResource TangoDarkForegroundBrush}" Text="{Binding ExpandedMessage}" FontSize="{StaticResource TangoSmallFontSize}" TextWrapping="NoWrap" VerticalAlignment="Center" HorizontalAlignment="Left" TextTrimming="CharacterEllipsis"/>
</StackPanel>
<Grid Grid.Column="2" Width="40" HorizontalAlignment="Right" VerticalAlignment="Stretch" Visibility="{Binding CanClose,Converter={StaticResource BooleanToVisibilityConverter}}">