mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +08:00
Update WPF UI
This commit is contained in:
parent
2c15666bf9
commit
479a205abd
|
@ -1,6 +1,7 @@
|
|||
<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"
|
||||
|
@ -41,6 +42,21 @@
|
|||
<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>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{l:Loc AddRoomFailedDialog_CloseButtonText}" TextAlignment="Center" FontSize="20"/>
|
||||
<TextBlock Text="{l:Loc AddRoomFailedDialog_Title}" TextAlignment="Center" FontSize="20"/>
|
||||
<TextBlock Grid.Row="1" Text="{l:Loc {Binding StringFormat=AddRoomFailedDialog_ErrorText_{0}}}" VerticalAlignment="Center" TextAlignment="Center" FontSize="16"/>
|
||||
</Grid>
|
||||
</ui:ContentDialog>
|
||||
|
|
|
@ -10,23 +10,14 @@
|
|||
l:ResxLocalizationProvider.DefaultAssembly="BililiveRecorder.WPF"
|
||||
l:ResxLocalizationProvider.DefaultDictionary="Strings"
|
||||
xmlns:local="clr-namespace:BililiveRecorder.WPF.Controls"
|
||||
|
||||
xmlns:core="clr-namespace:BililiveRecorder.Core;assembly=BililiveRecorder.Core"
|
||||
DefaultButton="Close"
|
||||
PrimaryButtonText="{l:Loc Global_Delete}"
|
||||
CloseButtonText="{l:Loc Global_Cancel}"
|
||||
|
||||
d:DataContext="{d:DesignInstance core:Room}"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel>
|
||||
<TextBlock TextAlignment="Center" FontSize="18" Text="{l:Loc DeleteRoomConfirmDialog_Title}" Margin="0,0,0,5"/>
|
||||
<TextBlock VerticalAlignment="Center" Style="{DynamicResource SubtitleTextBlockStyle}" FontFamily="Microsoft Yahei" TextWrapping="NoWrap" HorizontalAlignment="Center"
|
||||
TextAlignment="Center" TextTrimming="CharacterEllipsis" Text="{Binding StreamerName,Mode=OneWay}" ToolTip="{Binding StreamerName,Mode=OneWay}"/>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="2" Margin="5,0,0,0">
|
||||
<ui:PathIcon Height="10" Style="{StaticResource PathIconDataUpperCaseIdentifier}" />
|
||||
<TextBlock Text="{Binding RoomId, StringFormat=\{0\},Mode=OneWay}" Margin="4,0"/>
|
||||
<ui:PathIcon Height="10" Style="{StaticResource PathIconDataLowerCaseIdentifier}" Margin="3,0"
|
||||
Visibility="{Binding ShortRoomId,Converter={StaticResource ShortRoomIdToVisibilityConverter}}"/>
|
||||
<TextBlock Text="{Binding ShortRoomId, StringFormat=\{0\},Mode=OneWay}"
|
||||
Visibility="{Binding ShortRoomId,Converter={StaticResource ShortRoomIdToVisibilityConverter}}"/>
|
||||
</StackPanel>
|
||||
<ContentControl Content="{Binding}" ContentTemplate="{StaticResource RoomDialogHeader}"/>
|
||||
</StackPanel>
|
||||
</ui:ContentDialog>
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
l:ResxLocalizationProvider.DefaultDictionary="Strings"
|
||||
xmlns:local="clr-namespace:BililiveRecorder.WPF.Controls"
|
||||
xmlns:confiv2="clr-namespace:BililiveRecorder.Core.Config.V2;assembly=BililiveRecorder.Core"
|
||||
xmlns:core="clr-namespace:BililiveRecorder.Core;assembly=BililiveRecorder.Core"
|
||||
d:DataContext="{d:DesignInstance core:Room}"
|
||||
DefaultButton="Close"
|
||||
CloseButtonText="{l:Loc Global_Close}"
|
||||
mc:Ignorable="d">
|
||||
|
@ -20,16 +22,7 @@
|
|||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<TextBlock VerticalAlignment="Center" Style="{DynamicResource SubtitleTextBlockStyle}" FontFamily="Microsoft Yahei" TextWrapping="NoWrap" HorizontalAlignment="Center"
|
||||
TextAlignment="Center" TextTrimming="CharacterEllipsis" Text="{Binding StreamerName,Mode=OneWay}" ToolTip="{Binding StreamerName,Mode=OneWay}"/>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="2" Margin="5,0,0,0">
|
||||
<ui:PathIcon Height="10" Style="{StaticResource PathIconDataUpperCaseIdentifier}" />
|
||||
<TextBlock Text="{Binding RoomId, StringFormat=\{0\},Mode=OneWay}" Margin="4,0"/>
|
||||
<ui:PathIcon Height="10" Style="{StaticResource PathIconDataLowerCaseIdentifier}" Margin="3,0"
|
||||
Visibility="{Binding ShortRoomId,Converter={StaticResource ShortRoomIdToVisibilityConverter}}"/>
|
||||
<TextBlock Text="{Binding ShortRoomId, StringFormat=\{0\},Mode=OneWay}"
|
||||
Visibility="{Binding ShortRoomId,Converter={StaticResource ShortRoomIdToVisibilityConverter}}"/>
|
||||
</StackPanel>
|
||||
<ContentControl Content="{Binding}" ContentTemplate="{StaticResource RoomDialogHeader}"/>
|
||||
<Separator/>
|
||||
</StackPanel>
|
||||
<ScrollViewer Grid.Row="1">
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
l:ResxLocalizationProvider.DefaultDictionary="Strings"
|
||||
xmlns:local="clr-namespace:BililiveRecorder.WPF.Controls"
|
||||
xmlns:core="clr-namespace:BililiveRecorder.Core;assembly=BililiveRecorder.Core"
|
||||
d:DesignWidth="220" d:DesignHeight="110"
|
||||
d:DataContext="{d:DesignInstance core:Room}"
|
||||
d:DesignWidth="220" d:DesignHeight="110"
|
||||
mc:Ignorable="d">
|
||||
<Border Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
|
||||
BorderBrush="{DynamicResource SystemControlBackgroundAccentBrush}"
|
||||
|
@ -144,7 +144,7 @@
|
|||
</Border.ToolTip>
|
||||
<Grid>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<ui:PathIcon MaxWidth="11" Style="{Binding Stats.DuraionRatio, Converter={StaticResource RatioToArrowIconConverter}}"/>
|
||||
<ui:PathIcon MaxWidth="11" Foreground="Black" Style="{Binding Stats.DuraionRatio, Converter={StaticResource RatioToArrowIconConverter}}"/>
|
||||
<TextBlock HorizontalAlignment="Center" Foreground="Black">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{l:StringFormatConverter}">
|
||||
|
|
|
@ -76,10 +76,6 @@
|
|||
<c:SettingWithDefault IsSettingNotUsingDefault="{Binding HasRecordFilenameFormat}" Header="{l:Loc Settings_FileName_Record}">
|
||||
<TextBox Text="{Binding RecordFilenameFormat,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
||||
</c:SettingWithDefault>
|
||||
<c:SettingWithDefault IsSettingNotUsingDefault="{Binding HasClipFilenameFormat}" Header="{l:Loc Settings_FileName_Clip}" Margin="0,5,0,0"
|
||||
Visibility="{Binding ElementName=EnabledFeatureRecordOnlyRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityCollapsedConverter}}">
|
||||
<TextBox Text="{Binding ClipFilenameFormat,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
||||
</c:SettingWithDefault>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="{l:Loc Settings_Webhook_Title}">
|
||||
|
@ -93,24 +89,6 @@
|
|||
Text="{Binding WebHookUrls,UpdateSourceTrigger=PropertyChanged,Delay=1000}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="{l:Loc Settings_RecordMode_Title}">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{l:Loc Settings_RecordMode_Description}"/>
|
||||
|
||||
<StackPanel Margin="0,5,0,0" Visibility="{Binding ElementName=EnabledFeatureRecordOnlyRadioButton,Path=IsChecked,Converter={StaticResource InvertBooleanToVisibilityCollapsedConverter}}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{l:Loc Settings_RecordMode_Clip_PastDuration_Left}"/>
|
||||
<TextBox Margin="5,0" Width="80" Text="{Binding ClipLengthPast,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
||||
<TextBlock Text="{l:Loc Settings_RecordMode_Clip_PastDuration_Right}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{l:Loc Settings_RecordMode_Clip_FutureDuration_Left}"/>
|
||||
<TextBox Margin="5,0" Width="80" Text="{Binding ClipLengthFuture,Delay=500}" ui:TextBoxHelper.IsDeleteButtonVisible="False"/>
|
||||
<TextBlock Text="{l:Loc Settings_RecordMode_Clip_FutureDuration_Right}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</ui:SimpleStackPanel>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
|
|
|
@ -11,10 +11,55 @@
|
|||
l:ResxLocalizationProvider.DefaultDictionary="Strings"
|
||||
xmlns:local="clr-namespace:BililiveRecorder.WPF.Pages"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
d:DesignHeight="600" d:DesignWidth="900"
|
||||
Title="ToolboxAutoFixPage">
|
||||
|
||||
<Grid>
|
||||
<TextBlock Text="还 没 做" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32"/>
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<DockPanel Margin="0,0,0,10">
|
||||
<Button VerticalAlignment="Bottom" DockPanel.Dock="Right" Content="修复失败?">
|
||||
<ui:FlyoutService.Flyout>
|
||||
<ui:Flyout Placement="LeftEdgeAlignedTop">
|
||||
<StackPanel>
|
||||
<TextBlock Text="如果修复出错、或在修复后依旧有问题"/>
|
||||
<TextBlock Text="请发邮件到 rec@danmuji.org 反馈"/>
|
||||
<TextBlock Text="在邮件内附上此处导出的分析数据"/>
|
||||
<TextBlock Text="并尽量详细描述视频的问题、所使用的录播姬版本"/>
|
||||
<TextBlock Text="请分析未经修复的原始文件,而不是录播姬修复后的文件"/>
|
||||
<TextBlock><Hyperlink NavigateUri=""><Run Text="更多信息请点击这里"/></Hyperlink></TextBlock>
|
||||
<Button Margin="0,15,0,10" HorizontalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ui:PathIcon Margin="0,0,5,0" Style="{StaticResource PathIconDataExport}"/>
|
||||
<TextBlock Text="导出原始分析数据"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</ui:Flyout>
|
||||
</ui:FlyoutService.Flyout>
|
||||
</Button>
|
||||
<Button VerticalAlignment="Bottom" DockPanel.Dock="Right" Margin="5,0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ui:PathIcon Height="14" Margin="0,0,5,0" Style="{StaticResource PathIconDataAutoFix}"/>
|
||||
<TextBlock Text="修复"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button VerticalAlignment="Bottom" DockPanel.Dock="Right">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ui:PathIcon Height="14" Margin="0,0,5,0" Style="{StaticResource PathIconDataMagnifyScan}"/>
|
||||
<TextBlock Text="分析"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button VerticalAlignment="Bottom" DockPanel.Dock="Right" Content="选择..." Margin="0,0,5,0"/>
|
||||
<TextBox ui:ControlHelper.PlaceholderText="FLV 文件" x:Name="FileNameTextBox"/>
|
||||
</DockPanel>
|
||||
<Border Grid.Row="1" BorderThickness="1" CornerRadius="5"
|
||||
Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
|
||||
BorderBrush="{DynamicResource SystemControlBackgroundAccentBrush}">
|
||||
<Grid>
|
||||
<TextBlock Text="还 没 做" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ui:Page>
|
||||
|
|
|
@ -79,6 +79,12 @@
|
|||
<Style TargetType="ui:PathIcon" x:Key="PathIconDataArrowDownBold">
|
||||
<Setter Property="Data" Value="M9,4H15V12H19.84L12,19.84L4.16,12H9V4Z"/>
|
||||
</Style>
|
||||
<Style TargetType="ui:PathIcon" x:Key="PathIconDataExport">
|
||||
<Setter Property="Data" Value="M23,12L19,8V11H10V13H19V16M1,18V6C1,4.89 1.9,4 3,4H15A2,2 0 0,1 17,6V9H15V6H3V18H15V15H17V18A2,2 0 0,1 15,20H3A2,2 0 0,1 1,18Z"/>
|
||||
</Style>
|
||||
<Style TargetType="ui:PathIcon" x:Key="PathIconDataMagnifyScan">
|
||||
<Setter Property="Data" Value="M17 22V20H20V17H22V20.5C22 20.89 21.84 21.24 21.54 21.54C21.24 21.84 20.89 22 20.5 22H17M7 22H3.5C3.11 22 2.76 21.84 2.46 21.54C2.16 21.24 2 20.89 2 20.5V17H4V20H7V22M17 2H20.5C20.89 2 21.24 2.16 21.54 2.46C21.84 2.76 22 3.11 22 3.5V7H20V4H17V2M7 2V4H4V7H2V3.5C2 3.11 2.16 2.76 2.46 2.46C2.76 2.16 3.11 2 3.5 2H7M10.5 6C13 6 15 8 15 10.5C15 11.38 14.75 12.2 14.31 12.9L17.57 16.16L16.16 17.57L12.9 14.31C12.2 14.75 11.38 15 10.5 15C8 15 6 13 6 10.5C6 8 8 6 10.5 6M10.5 8C9.12 8 8 9.12 8 10.5C8 11.88 9.12 13 10.5 13C11.88 13 13 11.88 13 10.5C13 9.12 11.88 8 10.5 8Z"/>
|
||||
</Style>
|
||||
<Style TargetType="ui:PathIcon" x:Key="PathIconData">
|
||||
<Setter Property="Data" Value=""/>
|
||||
</Style>
|
||||
|
|
Loading…
Reference in New Issue
Block a user