统计面板(未完成)

This commit is contained in:
ZouJin 2023-10-25 23:57:18 +08:00
parent 51140bb091
commit 027aa02d4d
5 changed files with 229 additions and 156 deletions

View File

@ -18,7 +18,7 @@
<Border x:Name="BdrPanel" Margin="0,0,0,55" VerticalAlignment="Bottom" x:FieldModifier="public"
Background="{DynamicResource DARKPrimaryText}" BorderBrush="{DynamicResource DARKPrimaryDarker}"
BorderThickness="1" CornerRadius="5" MouseLeave="MenuPanel_MouseLeave" TextBlock.FontSize="24"
TextElement.FontSize="24" Visibility="Collapsed" >
TextElement.FontSize="24" Visibility="Collapsed" Cursor="">
<Grid Margin="15" x:Name="gdPanel" x:FieldModifier="public">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@ -41,7 +41,7 @@
Foreground="{DynamicResource DARKPrimary}" Text="Lv 14" />
<Button Grid.Column="2" Grid.ColumnSpan="3" HorizontalAlignment="Right" VerticalAlignment="Center"
Background="Transparent" Click="MenuPanel_Click" Content="{ll:Str 详细}" Cursor="Hand"
Foreground="{DynamicResource DARKPrimary}" Visibility="Collapsed">
Foreground="{DynamicResource DARKPrimary}" Grid.Row="2">
<Button.ContentTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" TextDecorations="Underline" />

View File

@ -103,7 +103,7 @@ namespace VPet_Simulator.Windows
public void ShowPanel()
{
var panelWindow = new winCharacterPanel();
var panelWindow = new winCharacterPanel(mw);
panelWindow.ShowDialog();
}

View File

@ -1,152 +1,182 @@
<pu:WindowX x:Class="VPet_Simulator.Windows.winCharacterPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VPet_Simulator.Windows"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
mc:Ignorable="d"
d:DesignHeight="800"
d:DesignWidth="800"
Title="面板"
Width="400"
Height="650"
Style="{DynamicResource BaseWindowXStyle}"
WindowStartupLocation="CenterScreen">
<Grid Margin="15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="7" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!--<Label Grid.Column="3" Width="14" Height="14" Background="Transparent" Foreground="{DynamicResource PrimaryText}" Padding="0" VerticalContentAlignment="Center" FontSize="10"
HorizontalContentAlignment="Center" BorderBrush="{DynamicResource PrimaryText}" BorderThickness="1" pu:LabelHelper.CornerRadius="7" Content="i" />-->
<TextBlock Margin="0,10,0,0" VerticalAlignment="Top" Text="金钱:" FontWeight="Heavy" />
<StackPanel Grid.Column="2">
<TextBlock FontSize="20" Foreground="{DynamicResource DARKPrimary}" Text="$100,000" />
<TextBlock Margin="5,0,0,10" Text="钱不是万能的,没钱是万万不能的" Foreground="{DynamicResource PrimaryText}" Opacity="0.5" />
</StackPanel>
<TextBlock x:Name="txtHearth" Grid.Row="1" Margin="0,13,0,0" Visibility="Collapsed" VerticalAlignment="Top" Text="健康值:" FontWeight="Heavy" />
<StackPanel x:Name="stkHearth" Grid.Row="1" Grid.Column="2" Margin="0,10,0,0" Visibility="Collapsed">
<ProgressBar FontSize="10" Height="20" Value="50" Foreground="{DynamicResource DangerProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource DangerProgressBarForeground}" BorderThickness="1.5" pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4" pu:ProgressBarHelper.GeneratingPercentText="PgbHearth_GeneratingPercentText">
</ProgressBar>
<TextBlock Margin="0,5,0,10"
Foreground="{DynamicResource PrimaryText}" Opacity="0.5" TextWrapping="Wrap" Text="宠物已经生病。通过服用药物可以恢复健康状态。" />
</StackPanel>
<TextBlock Grid.Row="2" Margin="0,13,0,0" VerticalAlignment="Top" Text="等级:" FontWeight="Heavy" />
<StackPanel Grid.Row="2" Grid.Column="2" Margin="0,10,0,0">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VPet_Simulator.Windows"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" mc:Ignorable="d" Title="{ll:Str 面板}" Width="500"
Height="500" Style="{DynamicResource BaseWindowXStyle}" WindowStartupLocation="CenterScreen">
<TabControl x:Name="MainTab" Margin="5" pu:TabControlHelper.CanHeaderPanelScroll="True" SelectedIndex="0"
pu:TabControlHelper.ItemsCornerRadius="4" pu:TabControlHelper.ItemsHeight="NaN"
pu:TabControlHelper.ItemsHoverBackground="{DynamicResource PrimaryLight}"
pu:TabControlHelper.ItemsPadding="10,7"
pu:TabControlHelper.ItemsSelectedBackground="{DynamicResource PrimaryDark}"
pu:TabControlHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}" Background="Transparent"
BorderThickness="0" Foreground="{DynamicResource PrimaryText}"
Grid.Column="1">
<TabControl.ContentTemplate>
<DataTemplate>
<Border Margin="0,5,0,5" Background="{DynamicResource DARKPrimaryText}" CornerRadius="15">
<ContentControl Margin="0,0" Content="{Binding}" />
</Border>
</DataTemplate>
</TabControl.ContentTemplate>
<TabItem Header="{ll:Str 统计面板}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock FontSize="16" Foreground="{DynamicResource PrimaryText}" Text="Lv 10" />
<TextBlock Grid.Column="2" VerticalAlignment="Bottom" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource DARKPrimary}" Text="x1 经验速率" />
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBox Style="{DynamicResource StandardTextBoxStyle}" pu:TextBoxHelper.Watermark="{ll:Str 搜索统计}" />
<DataGrid x:Name="DataGridStatic" Grid.Row="1" Margin="0,5,0,0"/>
</Grid>
<ProgressBar Margin="0,5,0,0" FontSize="10" Height="20" Value="50" Foreground="{DynamicResource ProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource ProgressBarForeground}" BorderThickness="1.5" pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4" pu:ProgressBarHelper.GeneratingPercentText="PgbExperience_GeneratingPercentText">
</ProgressBar>
<TextBlock Margin="3,5,0,10" Foreground="{DynamicResource PrimaryText}" Opacity="0.5" TextWrapping="Wrap" Text="等级越高, 学习和打工收益更高" />
</StackPanel>
<TextBlock Grid.Row="3" Margin="0,13,0,0" VerticalAlignment="Top" Text="体力:" FontWeight="Heavy" />
<StackPanel Grid.Row="3" Grid.Column="2" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="{DynamicResource PrimaryText}" Text="恢复中(自然恢复)" />
<TextBlock Grid.Column="2" VerticalAlignment="Bottom" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource DARKPrimary}" Text="+1/tick" />
</Grid>
<ProgressBar Margin="0,5,0,0" FontSize="10" Height="20" Value="50" Foreground="{DynamicResource ProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource ProgressBarForeground}" BorderThickness="1.5" pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4" pu:ProgressBarHelper.GeneratingPercentText="PgbExperience_GeneratingPercentText">
</ProgressBar>
<TextBlock Margin="0,5,0,10"
Foreground="{DynamicResource PrimaryText}" Opacity="0.5" TextWrapping="Wrap" Text="睡觉可以快速恢复体力。饱腹度低于50时无法自然恢复体力。" />
</StackPanel>
<TextBlock Grid.Row="4" Margin="0,13,0,0" VerticalAlignment="Top" Text="心情:" FontWeight="Heavy" />
<StackPanel Grid.Row="4" Grid.Column="2" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="{DynamicResource PrimaryText}" Text="-" />
<TextBlock Grid.Column="2" VerticalAlignment="Bottom" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource DARKPrimary}" Text="+1/tick" />
</Grid>
<ProgressBar Margin="0,5,0,0" FontSize="10" Height="20" Value="60" Foreground="{DynamicResource ProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource ProgressBarForeground}" BorderThickness="1.5" pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4" pu:ProgressBarHelper.GeneratingPercentText="PgbSpirit_GeneratingPercentText">
</ProgressBar>
<TextBlock Margin="0,5,0,10"
Foreground="{DynamicResource PrimaryText}" Opacity="0.5" TextWrapping="Wrap" Text="摸头可以恢复心情。心情低于75时无法获得经验加成。" />
</StackPanel>
<TextBlock Grid.Row="5" Margin="0,13,0,0" VerticalAlignment="Top" Text="饱腹度:" FontWeight="Heavy" />
<StackPanel Grid.Row="5" Grid.Column="2" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="{DynamicResource PrimaryText}" Text="下降中(自然下降)" />
<TextBlock Grid.Column="2" VerticalAlignment="Bottom" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource DARKPrimary}" Text="+1/tick" />
</Grid>
<ProgressBar Margin="0,5,0,0" FontSize="10" Height="20" Value="80" Foreground="{DynamicResource ProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource ProgressBarForeground}" BorderThickness="1.5" pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4" pu:ProgressBarHelper.GeneratingPercentText="PgbHunger_GeneratingPercentText">
</ProgressBar>
<TextBlock Margin="0,5,0,10"
Foreground="{DynamicResource PrimaryText}" Opacity="0.5" TextWrapping="Wrap" Text="进食可以快速恢复饱腹度。" />
</StackPanel>
<TextBlock Grid.Row="6" Margin="0,13,0,0" VerticalAlignment="Top" Text="口渴度:" FontWeight="Heavy" />
<StackPanel Grid.Row="6"
Grid.Column="2"
Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="{DynamicResource PrimaryText}"
Text="下降中(自然下降)" />
<TextBlock Grid.Column="2"
VerticalAlignment="Bottom"
FontWeight="Bold"
FontSize="14"
Foreground="{DynamicResource DARKPrimary}"
Text="+1/tick" />
</Grid>
<ProgressBar Margin="0,5,0,0"
FontSize="10"
Height="20"
Value="20"
Foreground="{DynamicResource ProgressBarForeground}"
Background="Transparent"
BorderBrush="{DynamicResource ProgressBarForeground}"
BorderThickness="1.5"
pu:ProgressBarHelper.IsPercentVisible="True"
pu:ProgressBarHelper.CornerRadius="4"
pu:ProgressBarHelper.GeneratingPercentText="PgbThirsty_GeneratingPercentText">
</ProgressBar>
<TextBlock Grid.Column="2"
Margin="0,5,0,10"
Foreground="{DynamicResource PrimaryText}"
Opacity="0.5"
TextWrapping="Wrap"
Text="喝水可以快速恢复口渴度。口渴度低于25时宠物会生病。" />
</StackPanel>
</Grid>
</TabItem>
<TabItem Header="{ll:Str 详情面板}" Visibility="Collapsed">
<ScrollViewer>
<Grid Margin="15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="7" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!--<Label Grid.Column="3" Width="14" Height="14" Background="Transparent" Foreground="{DynamicResource PrimaryText}" Padding="0" VerticalContentAlignment="Center" FontSize="10"
HorizontalContentAlignment="Center" BorderBrush="{DynamicResource PrimaryText}" BorderThickness="1" pu:LabelHelper.CornerRadius="7" Content="i" />-->
<TextBlock Margin="0,10,0,0" VerticalAlignment="Top" Text="金钱:" FontWeight="Heavy" />
<StackPanel Grid.Column="2">
<TextBlock FontSize="20" Foreground="{DynamicResource DARKPrimary}" Text="$100,000" />
<TextBlock Margin="5,0,0,10" Text="钱不是万能的,没钱是万万不能的" Foreground="{DynamicResource PrimaryText}"
Opacity="0.5" />
</StackPanel>
<TextBlock x:Name="txtHearth" Grid.Row="1" Margin="0,13,0,0" Visibility="Collapsed"
VerticalAlignment="Top" Text="健康值:" FontWeight="Heavy" />
<StackPanel x:Name="stkHearth" Grid.Row="1" Grid.Column="2" Margin="0,10,0,0" Visibility="Collapsed">
<ProgressBar FontSize="10" Height="20" Value="50"
Foreground="{DynamicResource DangerProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource DangerProgressBarForeground}" BorderThickness="1.5"
pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4"
pu:ProgressBarHelper.GeneratingPercentText="PgbHearth_GeneratingPercentText">
</ProgressBar>
<TextBlock Margin="0,5,0,10" Foreground="{DynamicResource PrimaryText}" Opacity="0.5"
TextWrapping="Wrap" Text="宠物已经生病。通过服用药物可以恢复健康状态。" />
</StackPanel>
<TextBlock Grid.Row="2" Margin="0,13,0,0" VerticalAlignment="Top" Text="等级:" FontWeight="Heavy" />
<StackPanel Grid.Row="2" Grid.Column="2" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock FontSize="16" Foreground="{DynamicResource PrimaryText}" Text="Lv 10" />
<TextBlock Grid.Column="2" VerticalAlignment="Bottom" FontWeight="Bold" FontSize="14"
Foreground="{DynamicResource DARKPrimary}" Text="x1 经验速率" />
</Grid>
<ProgressBar Margin="0,5,0,0" FontSize="10" Height="20" Value="50"
Foreground="{DynamicResource ProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource ProgressBarForeground}" BorderThickness="1.5"
pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4"
pu:ProgressBarHelper.GeneratingPercentText="PgbExperience_GeneratingPercentText">
</ProgressBar>
<TextBlock Margin="3,5,0,10" Foreground="{DynamicResource PrimaryText}" Opacity="0.5"
TextWrapping="Wrap" Text="等级越高, 学习和打工收益更高" />
</StackPanel>
<TextBlock Grid.Row="3" Margin="0,13,0,0" VerticalAlignment="Top" Text="体力:" FontWeight="Heavy" />
<StackPanel Grid.Row="3" Grid.Column="2" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="{DynamicResource PrimaryText}" Text="恢复中(自然恢复)" />
<TextBlock Grid.Column="2" VerticalAlignment="Bottom" FontWeight="Bold" FontSize="14"
Foreground="{DynamicResource DARKPrimary}" Text="+1/tick" />
</Grid>
<ProgressBar Margin="0,5,0,0" FontSize="10" Height="20" Value="50"
Foreground="{DynamicResource ProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource ProgressBarForeground}" BorderThickness="1.5"
pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4"
pu:ProgressBarHelper.GeneratingPercentText="PgbExperience_GeneratingPercentText">
</ProgressBar>
<TextBlock Margin="0,5,0,10" Foreground="{DynamicResource PrimaryText}" Opacity="0.5"
TextWrapping="Wrap" Text="睡觉可以快速恢复体力。饱腹度低于50时无法自然恢复体力。" />
</StackPanel>
<TextBlock Grid.Row="4" Margin="0,13,0,0" VerticalAlignment="Top" Text="心情:" FontWeight="Heavy" />
<StackPanel Grid.Row="4" Grid.Column="2" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="{DynamicResource PrimaryText}" Text="-" />
<TextBlock Grid.Column="2" VerticalAlignment="Bottom" FontWeight="Bold" FontSize="14"
Foreground="{DynamicResource DARKPrimary}" Text="+1/tick" />
</Grid>
<ProgressBar Margin="0,5,0,0" FontSize="10" Height="20" Value="60"
Foreground="{DynamicResource ProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource ProgressBarForeground}" BorderThickness="1.5"
pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4"
pu:ProgressBarHelper.GeneratingPercentText="PgbSpirit_GeneratingPercentText">
</ProgressBar>
<TextBlock Margin="0,5,0,10" Foreground="{DynamicResource PrimaryText}" Opacity="0.5"
TextWrapping="Wrap" Text="摸头可以恢复心情。心情低于75时无法获得经验加成。" />
</StackPanel>
<TextBlock Grid.Row="5" Margin="0,13,0,0" VerticalAlignment="Top" Text="饱腹度:" FontWeight="Heavy" />
<StackPanel Grid.Row="5" Grid.Column="2" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="{DynamicResource PrimaryText}" Text="下降中(自然下降)" />
<TextBlock Grid.Column="2" VerticalAlignment="Bottom" FontWeight="Bold" FontSize="14"
Foreground="{DynamicResource DARKPrimary}" Text="+1/tick" />
</Grid>
<ProgressBar Margin="0,5,0,0" FontSize="10" Height="20" Value="80"
Foreground="{DynamicResource ProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource ProgressBarForeground}" BorderThickness="1.5"
pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4"
pu:ProgressBarHelper.GeneratingPercentText="PgbHunger_GeneratingPercentText">
</ProgressBar>
<TextBlock Margin="0,5,0,10" Foreground="{DynamicResource PrimaryText}" Opacity="0.5"
TextWrapping="Wrap" Text="进食可以快速恢复饱腹度。" />
</StackPanel>
<TextBlock Grid.Row="6" Margin="0,13,0,0" VerticalAlignment="Top" Text="口渴度:" FontWeight="Heavy" />
<StackPanel Grid.Row="6" Grid.Column="2" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="{DynamicResource PrimaryText}" Text="下降中(自然下降)" />
<TextBlock Grid.Column="2" VerticalAlignment="Bottom" FontWeight="Bold" FontSize="14"
Foreground="{DynamicResource DARKPrimary}" Text="+1/tick" />
</Grid>
<ProgressBar Margin="0,5,0,0" FontSize="10" Height="20" Value="20"
Foreground="{DynamicResource ProgressBarForeground}" Background="Transparent"
BorderBrush="{DynamicResource ProgressBarForeground}" BorderThickness="1.5"
pu:ProgressBarHelper.IsPercentVisible="True" pu:ProgressBarHelper.CornerRadius="4"
pu:ProgressBarHelper.GeneratingPercentText="PgbThirsty_GeneratingPercentText">
</ProgressBar>
<TextBlock Grid.Column="2" Margin="0,5,0,10" Foreground="{DynamicResource PrimaryText}"
Opacity="0.5" TextWrapping="Wrap" Text="喝水可以快速恢复口渴度。口渴度低于25时宠物会生病。" />
</StackPanel>
</Grid>
</ScrollViewer>
</TabItem>
</TabControl>
</pu:WindowX>

View File

@ -1,4 +1,6 @@
using Panuon.WPF.UI;
using LinePutScript.Localization.WPF;
using Panuon.WPF.UI;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
@ -10,9 +12,47 @@ namespace VPet_Simulator.Windows
/// </summary>
public partial class winCharacterPanel : WindowX
{
public winCharacterPanel()
MainWindow mw;
public winCharacterPanel(MainWindow mw)
{
this.mw = mw;
InitializeComponent();
foreach (var v in mw.GameSavesData.Statistics.Data)
{
Statlists.Add(new Statlist(v.Key, v.Value));
}
DataGridStatic.DataContext = Statlists;
}
private List<Statlist> Statlists { get; set; } = new List<Statlist>();
private class Statlist
{
public Statlist(string statid, string statcount)
{
this.statid = statid;
this.statcount = statcount;
if (statid.StartsWith("buy_"))
{
statname = "购买次数".Translate() + statid.Substring(3);
}
else
{
statname = statid.Translate();
}
}
/// <summary>
/// 统计ID
/// </summary>
public string statid { get; set; }
/// <summary>
/// 统计显示名称
/// </summary>
public string statname { get; set; }
/// <summary>
/// 统计内容
/// </summary>
public string statcount { get; set; }
}
private void PgbExperience_GeneratingPercentText(object sender, GeneratingPercentTextRoutedEventArgs e)
@ -47,7 +87,7 @@ namespace VPet_Simulator.Windows
progressBar.Foreground = GetForeground(e.Value);
progressBar.BorderBrush = GetForeground(e.Value);
e.Text = $"{e.Value} / 100";
if(e.Value <= 20)
if (e.Value <= 20)
{
txtHearth.Visibility = Visibility.Visible;
stkHearth.Visibility = Visibility.Visible;
@ -61,11 +101,11 @@ namespace VPet_Simulator.Windows
private Brush GetForeground(double value)
{
if(value >= 80)
if (value >= 80)
{
return FindResource("SuccessProgressBarForeground") as Brush;
}
else if(value >= 50)
else if (value >= 50)
{
return FindResource("WarningProgressBarForeground") as Brush;
}

View File

@ -396,6 +396,9 @@
<Button x:Name="btn_cleancache" Grid.Row="1" Grid.Column="2" Margin="4" Padding="1"
pu:ButtonHelper.CornerRadius="4" Background="{DynamicResource SecondaryLight}"
Click="cleancache_click" Content="{ll:Str 清理缓存}" ToolTip="{ll:Str '清理缓存的动画,声音文件'}" />
<Button Grid.Row="1" Grid.Column="2" Margin="4" Padding="1"
pu:ButtonHelper.CornerRadius="4" Background="{DynamicResource SecondaryLight}"
Click="cleancache_click" Content="{ll:Str 清理缓存}" ToolTip="{ll:Str '清理缓存的动画,声音文件'}" />
<TextBlock Margin="0,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"
Background="{x:Null}" TextWrapping="Wrap">
<Run FontSize="18" FontWeight="Bold" Text="{ll:Str 桌宠多开}" /> <LineBreak />