mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-12-26 12:15:42 +08:00
65 lines
4.3 KiB
XML
65 lines
4.3 KiB
XML
<Application
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:BililiveRecorder.WPF"
|
|
xmlns:ui="http://schemas.modernwpf.com/2019"
|
|
xmlns:l="https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension"
|
|
xmlns:m="clr-namespace:BililiveRecorder.WPF.Models"
|
|
x:Class="BililiveRecorder.WPF.App"
|
|
Startup="Application_Startup"
|
|
Exit="Application_Exit"
|
|
SessionEnding="Application_SessionEnding"
|
|
StartupUri="NewMainWindow.xaml">
|
|
<Application.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ui:ThemeResources />
|
|
<ui:XamlControlsResources />
|
|
<!-- Other merged dictionaries here -->
|
|
<ResourceDictionary Source="Resources/IconResources.xaml" />
|
|
<ResourceDictionary Source="Resources/ConverterResources.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<!-- Other app resources here -->
|
|
<FontFamily x:Key="ContentControlThemeFontFamily">Microsoft YaHei</FontFamily>
|
|
<ContextMenu x:Key="CopyTextContextMenu" DataContext="{Binding RelativeSource={RelativeSource Mode=Self},Path=PlacementTarget}"
|
|
l:ResxLocalizationProvider.DefaultDictionary="Strings">
|
|
<MenuItem Header="{l:Loc Global_Copy}" Command="{x:Static m:Commands.Copy}" CommandParameter="{Binding Text}"/>
|
|
</ContextMenu>
|
|
<DataTemplate x:Key="RoomCardStatsPopup">
|
|
<StackPanel l:ResxLocalizationProvider.DefaultDictionary="Strings">
|
|
<TextBlock>
|
|
<TextBlock.Text>
|
|
<MultiBinding Converter="{l:StringFormatConverter}">
|
|
<l:BLoc Key="RoomCard_Status_SpeedIndicator_SpeedInPercentage"/>
|
|
<Binding Path="Stats.DuraionRatio" Mode="OneWay"/>
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
<TextBlock Text="{Binding Stats.FileMaxTimestamp,StringFormat=当前文件时长: {0:g}}"/>
|
|
<TextBlock Text="{Binding Stats.SessionMaxTimestamp,StringFormat=所有文件时长: {0:g}}"/>
|
|
<TextBlock Text="{Binding Stats.SessionDuration,StringFormat=录制经过时间: {0:g}}"/>
|
|
<TextBlock Text="{Binding Stats.TotalInputBytes, Converter={StaticResource ByteUnitsConverter},StringFormat=接收数据量 {0}}"/>
|
|
<TextBlock Text="{Binding Stats.TotalOutputBytes, Converter={StaticResource ByteUnitsConverter},StringFormat=写入数据量 {0}}"/>
|
|
<TextBlock Margin="0,5,0,0" Text="{l:Loc RoomCard_Status_SpeedIndicator_Description}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
<DataTemplate x:Key="RoomDialogHeader">
|
|
<StackPanel>
|
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Style="{DynamicResource SubtitleTextBlockStyle}"
|
|
FontFamily="Microsoft Yahei" TextWrapping="NoWrap" TextAlignment="Center" TextTrimming="CharacterEllipsis"
|
|
Text="{Binding Name,Mode=OneWay}" ToolTip="{Binding Name,Mode=OneWay}"/>
|
|
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
|
|
<ui:PathIcon Height="10" Style="{StaticResource PathIconDataUpperCaseIdentifier}" />
|
|
<TextBlock Text="{Binding RoomConfig.RoomId, StringFormat=\{0\},Mode=OneWay}" Margin="4,0"/>
|
|
<ui:PathIcon Height="10" Style="{StaticResource PathIconDataLowerCaseIdentifier}" Margin="3,0"
|
|
Visibility="{Binding ShortId,Converter={StaticResource ShortRoomIdToVisibilityConverter}}"/>
|
|
<TextBlock Text="{Binding ShortId, StringFormat=\{0\},Mode=OneWay}"
|
|
Visibility="{Binding ShortId,Converter={StaticResource ShortRoomIdToVisibilityConverter}}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ResourceDictionary>
|
|
</Application.Resources>
|
|
</Application>
|