diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-06-04 12:17:07 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-06-04 12:17:07 +0300 |
| commit | 01c810c6a391cf96f7d486b1e41d2c76ecfb51f5 (patch) | |
| tree | f0684ae37357f84fad6d4f5e717b1501349c8db4 | |
| parent | 88b86ef619bd57e18fda7e8aad416cd0c0e33f45 (diff) | |
| download | Tango-01c810c6a391cf96f7d486b1e41d2c76ecfb51f5.tar.gz Tango-01c810c6a391cf96f7d486b1e41d2c76ecfb51f5.zip | |
PPC. Overview. Show progress in weight total when it is completed.
Related Work Items: #8405
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs | 2 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs index 05a41912c..f451fe0d9 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs @@ -42,7 +42,7 @@ namespace Tango.PPC.UI.Converters var currentProgressBy4Spools = (double)currentProgresslength * 4; int coeff = (int)currentProgressBy4Spools / (int)totalBy4Spools; - var progressCurrent = coeff == 0 ? currentProgressBy4Spools : currentProgressBy4Spools % (coeff * totalBy4Spools);//show for progress + var progressCurrent = (coeff == 0 || coeff == 1) ? currentProgressBy4Spools : currentProgressBy4Spools % (coeff * totalBy4Spools);//show for progress var weight = ((double)progressCurrent * coef) / (1000);//(g) if (forOneSpool) { 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 8e7a6918b..996b54d13 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -557,7 +557,7 @@ <StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityConverter}}"> <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center"> <TextBlock.Text> - <MultiBinding Converter="{StaticResource ProgressWeightSpoolConverter}" StringFormat="0.##" TargetNullValue='-' FallbackValue='0'> + <MultiBinding Converter="{StaticResource ProgressWeightSpoolConverter}" StringFormat="0.00" TargetNullValue='-' FallbackValue='0'> <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp" /> <Binding Path="IsSpoolView"/> <Binding Path="RunningJobStatus.ProgressMinusSettingUp" /> @@ -884,7 +884,7 @@ </Grid.ColumnDefinitions> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" > <Image Margin="0 2 0 0" Source="../Images/Job Issues/job_length.png" Stretch="Uniform" VerticalAlignment="Top" HorizontalAlignment="Left" Width="Auto" Height="32" /> - <TextBlock Margin="20 10 0 0" Width="50" FontWeight="SemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}" > + <TextBlock Margin="20 5 0 0" Width="Auto" FontWeight="SemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}" VerticalAlignment="Top"> <TextBlock.Text> <MultiBinding Converter="{StaticResource LengthWithSpoolsConverter}" StringFormat="0.##" TargetNullValue='-' FallbackValue='-' Mode="OneWay"> <Binding Path="RunningJobStatus.ProgressMinusSettingUp" Mode="OneWay"/> @@ -894,7 +894,7 @@ </TextBlock> </StackPanel> <!--<Grid Grid.Column="1" Margin="20 8 20 0" VerticalAlignment="Top" Height="20">--> - <locaControls:RunningJobViewerEureka Grid.Column="1" Margin="20 12 20 0" VerticalAlignment="Top" ThumbHeight="16" Height="14" HeightSlider="14" DisplayMarkers="False" IsActive="True" Job="{Binding Job}" + <locaControls:RunningJobViewerEureka Grid.Column="1" Margin="10 12 20 0" VerticalAlignment="Top" ThumbHeight="16" Height="14" HeightSlider="14" DisplayMarkers="False" IsActive="True" Job="{Binding Job}" RunningJobStatus="{Binding RunningJobStatus}" MaximumValue="{Binding RunningJobStatus.TotalProgressMinusSettingUp, FallbackValue=100,TargetNullValue=100}" MinimumValue="0" |
