149 lines
5.9 KiB
XML
149 lines
5.9 KiB
XML
<UserControl x:Class="AnotherReplayReader.AIChatPanel"
|
|
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"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="350" d:DesignWidth="700">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 工具栏 -->
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="5">
|
|
<Button x:Name="_cancelButton"
|
|
Content="取消"
|
|
Click="OnCancelClick"
|
|
Visibility="Collapsed"
|
|
Margin="0,0,10,0"/>
|
|
<Button x:Name="_retryButton"
|
|
Content="重试当前段"
|
|
Click="OnRetryClick"
|
|
Visibility="Collapsed"
|
|
Margin="0,0,10,0"/>
|
|
<Button x:Name="_abortButton"
|
|
Content="放弃"
|
|
Click="OnAbortClick"
|
|
Visibility="Collapsed"
|
|
Margin="0,0,10,0"/>
|
|
|
|
<Separator Margin="5,0"/>
|
|
|
|
<TextBlock x:Name="_phaseText"
|
|
VerticalAlignment="Center"
|
|
FontWeight="Bold"
|
|
Margin="0,0,15,0"/>
|
|
|
|
<TextBlock x:Name="_timeText"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,15,0"/>
|
|
</StackPanel>
|
|
|
|
<!-- 主显示区 -->
|
|
<FlowDocumentScrollViewer x:Name="_outputViewer"
|
|
Grid.Row="1"
|
|
VerticalScrollBarVisibility="Auto"
|
|
Margin="5,0">
|
|
<FlowDocument>
|
|
<Paragraph>
|
|
<Run Text="AI 分析结果将在此显示..." />
|
|
</Paragraph>
|
|
</FlowDocument>
|
|
</FlowDocumentScrollViewer>
|
|
|
|
<!-- 状态栏 -->
|
|
<StatusBar Grid.Row="2">
|
|
|
|
<StatusBarItem HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Stretch">
|
|
<Grid VerticalAlignment="Stretch">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<!-- Progress takes ALL remaining space -->
|
|
<ColumnDefinition Width="3*" />
|
|
|
|
<!-- separators + fixed slots -->
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="2*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="3*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="6*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="7*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- ===================== -->
|
|
<!-- 1. CHAR PROGRESS -->
|
|
<!-- ===================== -->
|
|
<TextBlock x:Name="_charProgressText"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Margin="6,0"
|
|
TextTrimming="CharacterEllipsis"/>
|
|
|
|
<!-- separator 1 -->
|
|
<Border Grid.Column="1"
|
|
Width="1"
|
|
Margin="4,2"
|
|
Background="#80000000"
|
|
VerticalAlignment="Stretch"/>
|
|
|
|
<!-- instant speed -->
|
|
<TextBlock x:Name="_instantSpeedText"
|
|
Grid.Column="2"
|
|
TextAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Right" />
|
|
|
|
<!-- separator 2 -->
|
|
<Border Grid.Column="3"
|
|
Width="1"
|
|
Margin="4,2"
|
|
Background="#80000000"
|
|
VerticalAlignment="Stretch"/>
|
|
|
|
<!-- avg speed -->
|
|
<TextBlock x:Name="_avgSpeedText"
|
|
Grid.Column="4"
|
|
TextAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Right" />
|
|
|
|
<!-- separator 3 -->
|
|
<Border Grid.Column="5"
|
|
Width="1"
|
|
Margin="4,2"
|
|
Background="#80000000"
|
|
VerticalAlignment="Stretch"/>
|
|
|
|
<!-- current tokens -->
|
|
<TextBlock x:Name="_currentTokensText"
|
|
Grid.Column="6"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center" />
|
|
|
|
<!-- separator 4 -->
|
|
<Border Grid.Column="7"
|
|
Width="1"
|
|
Margin="4,2"
|
|
Background="#80000000"
|
|
VerticalAlignment="Stretch"/>
|
|
|
|
<!-- conversation tokens -->
|
|
<TextBlock x:Name="_conversationTokensText"
|
|
Grid.Column="8"
|
|
TextAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Right" />
|
|
</Grid>
|
|
</StatusBarItem>
|
|
|
|
</StatusBar>
|
|
</Grid>
|
|
</UserControl> |