Browse Source

1

样式分支
fyf 2 years ago
parent
commit
1b13e6760b
2 changed files with 7 additions and 7 deletions
  1. +6
    -6
      BPASmartClient.ScreenLib/总监视大屏/ScreenALLControl.xaml
  2. +1
    -1
      BPASmartClient.ScreenLib/总监视大屏/ScreenALLControlViewModel.cs

+ 6
- 6
BPASmartClient.ScreenLib/总监视大屏/ScreenALLControl.xaml View File

@@ -471,14 +471,14 @@
ItemsSource="{Binding StatsCountAll,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> ItemsSource="{Binding StatsCountAll,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<StackPanel x:Name="mainPanel1" Margin="15,10,0,0" >
<StackPanel x:Name="mainPanel1" Margin="15,5,0,0" >
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock HorizontalAlignment="Left" Style="{DynamicResource textms}" Margin="10,10,0,0" FontSize="20" Text="{Binding Name}"/>
<TextBlock HorizontalAlignment="Left" Style="{DynamicResource textms}" Margin="10,10,0,0" FontSize="20" Text="/"/>
<TextBlock HorizontalAlignment="Left" Style="{DynamicResource textms}" Margin="10,10,0,0" FontSize="20" Text="{Binding Count, StringFormat={}{0} 单}"/>
<TextBlock HorizontalAlignment="Left" Style="{DynamicResource textms}" Margin="10,5,0,0" FontSize="20" Text="{Binding Name}"/>
<TextBlock HorizontalAlignment="Left" Style="{DynamicResource textms}" Margin="10,5,0,0" FontSize="20" Text="/"/>
<TextBlock HorizontalAlignment="Left" Style="{DynamicResource textms}" Margin="10,5,0,0" FontSize="20" Text="{Binding Count, StringFormat={}{0} 单}"/>
</StackPanel> </StackPanel>
<Grid HorizontalAlignment="Left" Margin="0,10,0,0">
<ProgressBar Style="{DynamicResource bfb}" Value="{Binding bfb,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="360" Height="35" Margin="10,0,0,0"></ProgressBar>
<Grid HorizontalAlignment="Left" Margin="0,5,0,0">
<ProgressBar Style="{DynamicResource bfb}" Value="{Binding bfb,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="360" Height="24" Margin="10,0,0,0"></ProgressBar>
</Grid> </Grid>
</StackPanel> </StackPanel>


+ 1
- 1
BPASmartClient.ScreenLib/总监视大屏/ScreenALLControlViewModel.cs View File

@@ -225,7 +225,7 @@ namespace BPASmartClient.ScreenLib
_Stats?.ToList().ForEach(par => { _Stats?.ToList().ForEach(par => {
_Statsall.Add(new StatsAllModel { Name = par.Key,Count = par.Value }); _Statsall.Add(new StatsAllModel { Name = par.Key,Count = par.Value });
}); });
int maxcount = Stats.Max(k => k.Count);
int maxcount = _Statsall.Max(k => k.Count);
_Statsall?.ForEach(par => _Statsall?.ForEach(par =>
{ {
par.bfb = (int)(((double)par.Count / (double)maxcount) * 100.0); par.bfb = (int)(((double)par.Count / (double)maxcount) * 100.0);


Loading…
Cancel
Save