提交记录修改UI/Controls/Charts/Charts.cs+17 −0看文件
修改UI/Themes/Charts/Charts.xaml+14 −8看文件
修改UI/Views/DetailPage.xaml+7 −7看文件
| @@ -472,6 +472,23 @@ namespace UI.Controls.Charts | ||
| 472 | 472 | new PropertyMetadata(false, new PropertyChangedCallback(OnPropertyChanged))); |
| 473 | 473 | |
| 474 | 474 | |
| 475 | 新增: #endregion | |
| 476 | 新增: #region 是否显示分类信息 | |
| 477 | 新增: /// <summary> | |
| 478 | 新增: /// 是否显示分类信息(仅柱状图有效) | |
| 479 | 新增: /// </summary> | |
| 480 | 新增: public bool IsShowCategory | |
| 481 | 新增: { | |
| 482 | 新增: get { return (bool)GetValue(IsShowCategoryProperty); } | |
| 483 | 新增: set { SetValue(IsShowCategoryProperty, value); } | |
| 484 | 新增: } | |
| 485 | 新增: public static readonly DependencyProperty IsShowCategoryProperty = | |
| 486 | 新增: DependencyProperty.Register("IsShowCategory", | |
| 487 | 新增: typeof(bool), | |
| 488 | 新增: typeof(Charts), | |
| 489 | 新增: new PropertyMetadata(true, new PropertyChangedCallback(OnPropertyChanged))); | |
| 490 | 新增: | |
| 491 | 新增: | |
| 475 | 492 | #endregion |
| 476 | 493 | |
| 477 | 494 | private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) |
| @@ -93,7 +93,7 @@ | ||
| 93 | 93 | </Grid.RowDefinitions> |
| 94 | 94 | <StackPanel x:Name="ColumnTotal"> |
| 95 | 95 | <TextBlock Text="总计" Foreground="{DynamicResource SubTextBrush}"/> |
| 96 | 删除: <TextBlock Margin="0,10,0,0" Text="{TemplateBinding Total}" FontSize="20" Foreground="{DynamicResource DefaultTextBrush}"/> | |
| 96 | 新增: <TextBlock Margin="0,5,0,0" Text="{TemplateBinding Total}" FontSize="20" Foreground="{DynamicResource DefaultTextBrush}"/> | |
| 97 | 97 | </StackPanel> |
| 98 | 98 | <Grid Grid.Row="1" Margin="0,20,0,0"> |
| 99 | 99 | <Popup |
| @@ -165,16 +165,19 @@ | ||
| 165 | 165 | <StackPanel> |
| 166 | 166 | <Grid> |
| 167 | 167 | <Grid.ColumnDefinitions> |
| 168 | 删除: <ColumnDefinition Width="20"/> | |
| 168 | 新增: <ColumnDefinition Width="auto"/> | |
| 169 | 169 | <ColumnDefinition Width="auto"/> |
| 170 | 170 | <ColumnDefinition Width="auto"/> |
| 171 | 171 | |
| 172 | 172 | </Grid.ColumnDefinitions> |
| 173 | 删除: <Border Width="10" CornerRadius="4" Height="10" Background="{Binding Color,Converter={StaticResource HextoColorConverter}}"> | |
| 174 | 删除: <!--颜色--> | |
| 175 | 删除: </Border> | |
| 173 | 新增: <base:View Condition="not null" Value="{Binding Color}"> | |
| 174 | 新增: <Border Margin="0,0,5,0" Width="10" CornerRadius="4" Height="10" Background="{Binding Color,Converter={StaticResource HextoColorConverter}}"> | |
| 175 | 新增: <!--颜色--> | |
| 176 | 新增: </Border> | |
| 177 | 新增: </base:View> | |
| 176 | 178 | |
| 177 | 删除: <Border Grid.Column="1" Margin="5,0,0,0"> | |
| 179 | 新增: | |
| 180 | 新增: <Border Grid.Column="1" Margin="0,0,0,0"> | |
| 178 | 181 | <!--名称--> |
| 179 | 182 | <TextBlock Foreground="{DynamicResource DefaultTextBrush}" VerticalAlignment="Center" Text="{Binding Name}" FontSize="12"/> |
| 180 | 183 | </Border> |
| @@ -197,10 +200,10 @@ | ||
| 197 | 200 | <Border BorderThickness="1,0,0,1" BorderBrush="{DynamicResource ChartColBorderBrush}"> |
| 198 | 201 | <Canvas x:Name="TypeColumnCanvas"/> |
| 199 | 202 | </Border> |
| 200 | 删除: | |
| 203 | 新增: | |
| 201 | 204 | </Grid> |
| 202 | 205 | <!--信息--> |
| 203 | 删除: <Grid Grid.Row="2" Margin="0,5,0,0"> | |
| 206 | 新增: <Grid Grid.Row="2" Margin="0,5,0,0" x:Name="Category" Visibility="Collapsed"> | |
| 204 | 207 | <ListView ItemsSource="{TemplateBinding ColumnInfoList}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" > |
| 205 | 208 | <ListBox.Resources> |
| 206 | 209 | <Style TargetType="{x:Type ListView}"> |
| @@ -272,6 +275,9 @@ | ||
| 272 | 275 | </Grid> |
| 273 | 276 | |
| 274 | 277 | <ControlTemplate.Triggers> |
| 278 | 新增: <Trigger Property="IsShowCategory" Value="True"> | |
| 279 | 新增: <Setter Property="Visibility" Value="Visible" TargetName="Category"/> | |
| 280 | 新增: </Trigger> | |
| 275 | 281 | <MultiTrigger> |
| 276 | 282 | <MultiTrigger.Conditions> |
| 277 | 283 | <Condition Property="IsEmpty" Value="True"/> |
| @@ -139,14 +139,14 @@ | ||
| 139 | 139 | </Border>--> |
| 140 | 140 | |
| 141 | 141 | <WrapPanel Margin="-10"> |
| 142 | 删除: <StackPanel Margin="10,0,0,0"> | |
| 143 | 删除: <TextBlock Text="时段" Foreground="#5c5c5c" FontSize="14" Margin="0,20,0,0"/> | |
| 144 | 删除: <Tabbar:Tabbar Data="{Binding TabbarData}" SelectedIndex="{Binding TabbarSelectedIndex,Mode=TwoWay}" Width="180" HorizontalAlignment="Left"/> | |
| 145 | 删除: <Border Margin="0,15,0,0" Width="680" HorizontalAlignment="Left" Background="{DynamicResource SettingPanelBgBrush}" Padding="20,10" CornerRadius="10"> | |
| 142 | 新增: <StackPanel Margin="10,10,0,0"> | |
| 143 | 新增: <TextBlock Text="使用时长" Foreground="#5c5c5c" FontSize="14" Margin="0,20,0,0"/> | |
| 144 | 新增: | |
| 145 | 新增: <Border Margin="0,10,0,0" Width="680" HorizontalAlignment="Left" Background="{DynamicResource SettingPanelBgBrush}" Padding="20" CornerRadius="10"> | |
| 146 | 146 | <StackPanel> |
| 147 | 新增: <Tabbar:Tabbar Margin="0,-10,0,0" Data="{Binding TabbarData}" SelectedIndex="{Binding TabbarSelectedIndex,Mode=TwoWay}" Width="180" HorizontalAlignment="Left"/> | |
| 147 | 148 | |
| 148 | 删除: | |
| 149 | 删除: <Grid Margin="0,15,0,0"> | |
| 149 | 新增: <Grid > | |
| 150 | 150 | <!--按天--> |
| 151 | 151 | <base:View Condition="0" Value="{Binding TabbarSelectedIndex}"> |
| 152 | 152 | <Select:DateSelect Date="{Binding ChartDate,Mode=TwoWay}"/> |
| @@ -170,7 +170,7 @@ | ||
| 170 | 170 | |
| 171 | 171 | </base:View> |
| 172 | 172 | </Grid> |
| 173 | 删除: <Charts:Charts DataMaximum="{Binding DataMaximum}" Height="305" NameIndexStart="{Binding NameIndexStart}" ChartsType="Column" Data="{Binding ChartData}" Margin="0,20,0,0"/> | |
| 173 | 新增: <Charts:Charts IsShowCategory="False" DataMaximum="{Binding DataMaximum}" Height="305" NameIndexStart="{Binding NameIndexStart}" ChartsType="Column" Data="{Binding ChartData}" Margin="0,20,0,0"/> | |
| 174 | 174 | |
| 175 | 175 | </StackPanel> |
| 176 | 176 | |

