Skip to content

Commit

Permalink
Merge pull request #57 from SingleVrUser/dev
Browse files Browse the repository at this point in the history
v0.1.16.11
  • Loading branch information
SingleVrUser authored Apr 4, 2023
2 parents 4a566bb + b3eb5ff commit ad5651a
Show file tree
Hide file tree
Showing 25 changed files with 163 additions and 118 deletions.
18 changes: 13 additions & 5 deletions Display/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,33 @@
<SolidColorBrush x:Key="WindowCaptionBackgroundDisabled">Transparent</SolidColorBrush>
<SolidColorBrush x:Key="WindowCaptionForeground">#1e90ff</SolidColorBrush>
<SolidColorBrush x:Key="WindowCaptionForegroundDisabled">#abd5ff</SolidColorBrush>
<SolidColorBrush x:Key="RatingControlSelectedForeground" Color="#f7ba36" />
<SolidColorBrush x:Key="RatingControlUnselectedForeground" Color="#ecf0f1" />
</ResourceDictionary>

<!--控件颜色-->
<ResourceDictionary>
<ui:Color x:Key="ColorChecked">#8cb3ff</ui:Color>
<!--<Color x:Key="ColorAngleMark">#6495ed</Color>-->
<SolidColorBrush x:Key="CustomToggleButtonBackgroundChecked" Color="{StaticResource ColorChecked}" />
<SolidColorBrush x:Key="CustomToggleButtonBackgroundChecked"
Color="{ThemeResource SystemAccentColor}" />

<SolidColorBrush x:Key="AngleMarkBackground"
Color="CornflowerBlue"
Opacity="0.8"/>

<SolidColorBrush x:Key="ButtonEmphasizeBackground"
Color="{StaticResource ColorLightEmphasize}"/>
</ResourceDictionary>

<ResourceDictionary>
<SolidColorBrush x:Key="RatingControlSelectedForeground"
Color="#f7ba36" />
<SolidColorBrush x:Key="RatingControlUnselectedForeground"
Color="#ecf0f1" />

<SolidColorBrush x:Key="CardBackgroundFillColorDefaultBrush"
Color="{ThemeResource SystemAltHighColor}"/>

</ResourceDictionary>

<ResourceDictionary>
<Style TargetType="TextBlock">
<Setter Property="FontFamily"
Value="霞鹜文楷" />
Expand Down Expand Up @@ -208,6 +215,7 @@
<ui:Color x:Key="ControlColorDefault">#FFFFFF</ui:Color>
<ui:Color x:Key="ControlColorBorder">#EEEEF1</ui:Color>


<!--数值-->
<Thickness x:Key="AppBarButtonCompactMargin">0,-5,0,-20</Thickness>

Expand Down
7 changes: 3 additions & 4 deletions Display/ContentsPage/DatumList/FileListPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,8 @@
</CommandBar>

<controls:MetadataControl Margin="10,5"
Grid.Row="1"
Grid.Column="0"
x:Name="metadataControl"
x:Name="MetadataControl"
Separator=" > "
HorizontalAlignment="Left"
VerticalAlignment="Bottom">
Expand Down Expand Up @@ -264,7 +263,7 @@
</interactivity:Interaction.Behaviors>

<ListView.Header>
<Grid MinHeight="30" Background="White">
<Grid MinHeight="30">
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="50" Width="*" />
<ColumnDefinition Width="200" />
Expand Down Expand Up @@ -347,7 +346,7 @@
<!--中转站-->
<Grid x:Name="TransferStation_Grid"
Visibility="Collapsed"
Background="White"
Background="{StaticResource CardBackgroundFillColorDefaultBrush}"
Style="{StaticResource TempGridStyle}"
AllowDrop="True"
Drop="TransferStationGrid_Drop"
Expand Down
2 changes: 1 addition & 1 deletion Display/ContentsPage/DatumList/FileListPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private void Grid_loaded(object sender, RoutedEventArgs e)

filesInfos = new IncrementalLoadDatumCollection("0");
BaseExample.ItemsSource = filesInfos;
metadataControl.Items = _units;
MetadataControl.Items = _units;
filesInfos.GetFileInfoCompleted += FilesInfos_GetFileInfoCompleted;
}

Expand Down
2 changes: 1 addition & 1 deletion Display/ContentsPage/DatumList/VideoDisplay/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<Grid>
<SplitView x:Name="RootSplitView" PanePlacement="Right" IsPaneOpen="True" DisplayMode="Inline" OpenPaneLength="380">
<SplitView.Pane>
<Pivot x:Name="VideoPlay_Pivot">
<Pivot x:Name="VideoPlay_Pivot" Background="{StaticResource CardBackgroundFillColorDefaultBrush}">

<PivotItem Header="文件">
<Grid>
Expand Down
3 changes: 1 addition & 2 deletions Display/ContentsPage/SpiderVideoInfo/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
xmlns:customcontrols="using:Display.Controls"
xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls"
xmlns:converter="using:Display.Converter"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
mc:Ignorable="d">

<Page.Resources>
<converter:BytesToSizeStrConverter x:Key="BytesToSizeStrConverter" />
Expand Down
7 changes: 3 additions & 4 deletions Display/ContentsPage/SpiderVideoInfo/Progress.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
xmlns:lvc="using:LiveChartsCore.SkiaSharpView.WinUI"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
mc:Ignorable="d">

<Page.Resources>
<Style TargetType="Grid"
Expand Down Expand Up @@ -88,7 +87,7 @@
<TextBlock Text="文件数量占比" />
<lvc:PieChart x:Name="CountPercentPieChart"
LegendPosition="Right"
LegendBackground="{ThemeResource ApplicationPageBackgroundThemeBrush}" />
LegendBackground="Transparent" />
</StackPanel>
</Grid>

Expand Down Expand Up @@ -151,7 +150,7 @@
Grid.Row="1"
Visibility="Collapsed"
LegendPosition="Right"
LegendBackground="{ThemeResource ApplicationPageBackgroundThemeBrush}">
LegendBackground="Transparent">
</lvc:CartesianChart>
</Grid>

Expand Down
16 changes: 8 additions & 8 deletions Display/Controls/VideoCoverDisplay.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Display.Controls"
xmlns:sys="using:System"
xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls"
xmlns:customcontrols="using:Display.Controls"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
Expand Down Expand Up @@ -498,7 +497,6 @@
<!--图片-->
<Grid x:Name="showImage"
BorderThickness="2"
BorderBrush="{StaticResource ControlElevationBorderBrush}"
Padding="5">
<Image MinWidth="{x:Bind imagewidth,Mode=OneWay}"
MinHeight="{x:Bind imageheight,Mode=OneWay}">
Expand Down Expand Up @@ -581,7 +579,8 @@

<Grid Padding="3,0"
HorizontalAlignment="Center"
VerticalAlignment="Center">
VerticalAlignment="Center"
Background="{StaticResource CardBackgroundFillColorDefaultBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
Expand Down Expand Up @@ -727,7 +726,8 @@
Tapped="FailGrid_Tapped"
PointerEntered="FailGrid_PointerEntered"
PointerExited="FailGrid_PointerExited"
Margin="5,0">
Margin="5,0"
Background="{StaticResource ControlFillColorDefaultBrush}">

<Grid.ContextFlyout>
<MenuFlyout>
Expand Down Expand Up @@ -855,7 +855,7 @@
Visibility="{x:Bind IsShowSearchListView}"
MinHeight="40"
ColumnSpacing="5"
Background="{StaticResource FocusVisualWhiteStrokeThemeBrush}">
Background="{ThemeResource SystemAltMediumLowColor}">

<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
Expand Down Expand Up @@ -1001,7 +1001,7 @@
<!--筛选栏,默认隐藏-->
<customcontrols:InfoListFilter x:Name="InfosFilter"
Grid.Row="3"
Visibility="{x:Bind Filter_ToggleButton.IsChecked,Mode=OneWay}"
Visibility="{x:Bind FilterToggleButton.IsChecked,Mode=OneWay}"
Height="35"
Margin="5,2,0,0"
SplitButton_Click="InfoListFilter_SplitButton_Click"
Expand Down Expand Up @@ -1064,15 +1064,15 @@

</AppBarButton>

<ToggleButton x:Name="Filter_ToggleButton"
Style="{StaticResource DefaultToggleButtonStyle}"
<ToggleButton x:Name="FilterToggleButton"
IsEnabled="True"
BorderThickness="0"
FontFamily="Segoe Fluent Icons"
Content="&#xE16E;"
FontSize="18"
Foreground="Gray"
Visibility="{x:Bind IsShowSuccessListView,Mode=OneWay}"
Background="Transparent"
Unchecked="Filter_ToggleButton_Unchecked">
<ToggleButton.Resources>
<SolidColorBrush x:Key="ToggleButtonBackgroundPointerOver"
Expand Down
8 changes: 4 additions & 4 deletions Display/Controls/VideoCoverDisplay.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ private void ChangedOrderButtonFlyout(bool IsShowSuccessFlyout)
/// 显示的数据
/// 用于增量显示,成功列表
/// </summary>
private Models.IncrementalLoadSuccessInfoCollection _successInfoCollection;
public Models.IncrementalLoadSuccessInfoCollection SuccessInfoCollection
private IncrementalLoadSuccessInfoCollection _successInfoCollection;
public IncrementalLoadSuccessInfoCollection SuccessInfoCollection
{
get => _successInfoCollection;
set
Expand All @@ -146,8 +146,8 @@ public Models.IncrementalLoadSuccessInfoCollection SuccessInfoCollection
/// 显示的数据
/// 用于增量显示,失败列表(全部)
/// </summary>
private Models.IncrementalLoadFailDatumInfoCollection _allfailInfocollection;
public Models.IncrementalLoadFailDatumInfoCollection AllFailInfoCollection
private IncrementalLoadFailDatumInfoCollection _allfailInfocollection;
public IncrementalLoadFailDatumInfoCollection AllFailInfoCollection
{
get => _allfailInfocollection;
set
Expand Down
4 changes: 2 additions & 2 deletions Display/Controls/VideoDetails.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</UserControl.Resources>

<Grid BorderThickness="0,1,0,0"
Loaded="GridlLoaded"
Loaded="GridLoaded"
RowSpacing="10">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
Expand Down Expand Up @@ -198,7 +198,7 @@
Source="{x:Bind resultinfo.imagepath,Converter={StaticResource NotExistsImagePathConverter}}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
MaxHeight="500" />
MaxHeight="500"/>

<Grid x:Name="VideoPlayIconInCover"
Visibility="Collapsed">
Expand Down
32 changes: 18 additions & 14 deletions Display/Controls/VideoDetails.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ private async void loadData()
{
FontFamily = new FontFamily("霞鹜文楷"),
Content = content,
BorderThickness = new Thickness(0),
Background = Application.Current.Resources["ButtonEmphasizeBackground"] as SolidColorBrush,
BorderThickness = new Thickness(0.5),
Background = Application.Current.Resources["CardBackgroundFillColorDefaultBrush"] as SolidColorBrush,

};
button.Click += LabelButtonOnClick;
Expand Down Expand Up @@ -138,9 +138,11 @@ private async void loadData()

}

private void GridlLoaded(object sender, RoutedEventArgs e)
private void GridLoaded(object sender, RoutedEventArgs e)
{
loadData();

StartListCover_GridTapped();
}

// 点击了演员更多页
Expand Down Expand Up @@ -239,7 +241,7 @@ private async void DownButton_Click(object sender, RoutedEventArgs e)
CheckBox fileBox = item as CheckBox;
if (fileBox.IsChecked == true)
{
var selectVideoInfo = videoinfoList.Where(x => x.pc == fileBox.Name).First();
var selectVideoInfo = videoinfoList.FirstOrDefault(x => x.pc == fileBox.Name);
if (selectVideoInfo != null)
{
downVideoInfoList.Add(selectVideoInfo);
Expand All @@ -255,10 +257,7 @@ private async void DownButton_Click(object sender, RoutedEventArgs e)

bool isOk = await webApi.RequestDown(downVideoInfoList, downType, savePath, topFolderName);

if (isOk)
ShowTeachingTip("发送下载请求成功");
else
ShowTeachingTip("发送下载请求失败");
ShowTeachingTip(isOk ? "发送下载请求成功" : "发送下载请求失败");
}
else
{
Expand All @@ -268,18 +267,18 @@ private async void DownButton_Click(object sender, RoutedEventArgs e)

private void updateLookLater(bool? val)
{
long lookLater_t = val == true ? DateTimeOffset.Now.ToUnixTimeSeconds() : 0;
var lookLaterT = val == true ? DateTimeOffset.Now.ToUnixTimeSeconds() : 0;

resultinfo.look_later = lookLater_t;
DataAccess.UpdateSingleDataFromVideoInfo(resultinfo.truename, "look_later", lookLater_t.ToString());
resultinfo.look_later = lookLaterT;
DataAccess.UpdateSingleDataFromVideoInfo(resultinfo.truename, "look_later", lookLaterT.ToString());
}

private void updateLike(bool? val)
{
int is_like = val == true ? 1 : 0;
var isLike = val == true ? 1 : 0;

resultinfo.is_like = is_like;
DataAccess.UpdateSingleDataFromVideoInfo(resultinfo.truename, "is_like", is_like.ToString());
resultinfo.is_like = isLike;
DataAccess.UpdateSingleDataFromVideoInfo(resultinfo.truename, "is_like", isLike.ToString());
}

private void Animation_Completed(ConnectedAnimation sender, object args)
Expand Down Expand Up @@ -680,5 +679,10 @@ private void EnLargeImage_OnPointerExited(object sender, PointerRoutedEventArgs
VisualStateManager.GoToState(sender as Control, "EnlargeButtonHidden", true);
}
}

public void CoverImageAddEnterAnimation()
{
Cover_Image.Transitions.Add(new EntranceThemeTransition());
}
}
}
11 changes: 6 additions & 5 deletions Display/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<Window x:Class="Display.MainWindow"
<winUiEx:WindowEx x:Class="Display.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Display"
xmlns:customcontrols="using:Display.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:data="using:Display.Data"
xmlns:winUiEx="using:WinUIEx"
mc:Ignorable="d">

<Grid x:Name="RootGrid">
Expand Down Expand Up @@ -41,7 +42,7 @@
</DataTemplate>
</Grid.Resources>

<!--标题栏-->
<!--标题栏-->
<Grid x:Name="AppTitleBar"
Canvas.ZIndex="1"
VerticalAlignment="Top">
Expand Down Expand Up @@ -151,7 +152,7 @@
<Frame x:Name="ContentFrame"
NavigationFailed="ContentFrame_NavigationFailed"
Navigated="ContentFrame_Navigated"
CacheSize="1"
CacheSize="2"
KeyboardAcceleratorPlacementMode="Hidden">
<Frame.KeyboardAccelerators>
<KeyboardAccelerator Key="Left"
Expand All @@ -171,12 +172,12 @@
VerticalAlignment="Center"
Visibility="Collapsed">
<TextBlock FontSize="30"
CharacterSpacing="100">数据文件缺失,请以下文件是否存在</TextBlock>
CharacterSpacing="100">数据文件缺失,请检查以下文件是否存在</TextBlock>
<HyperlinkButton FontSize="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="{x:Bind data:DataAccess.dbpath}"
Click="HyperlinkButton_Click" />
</StackPanel>
</Grid>
</Window>
</winUiEx:WindowEx>
Loading

0 comments on commit ad5651a

Please sign in to comment.