Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Bili.Uwp
提交
f5fa8faf
B
Bili.Uwp
项目概览
jobily
/
Bili.Uwp
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
Bili.Uwp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f5fa8faf
编写于
6月 02, 2021
作者:
A
Anran Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
创建子分区的类型定义
上级
3c667375
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
338 addition
and
1 deletion
+338
-1
App.ruleset
App.ruleset
+2
-1
src/App/App.csproj
src/App/App.csproj
+7
-0
src/App/Pages/Overlay/SubPartitionPage.xaml
src/App/Pages/Overlay/SubPartitionPage.xaml
+11
-0
src/App/Pages/Overlay/SubPartitionPage.xaml.cs
src/App/Pages/Overlay/SubPartitionPage.xaml.cs
+18
-0
src/Models/Models.BiliBili/Banner.cs
src/Models/Models.BiliBili/Banner.cs
+67
-0
src/Models/Models.BiliBili/Partition/Partition.cs
src/Models/Models.BiliBili/Partition/Partition.cs
+0
-0
src/Models/Models.BiliBili/Partition/SubPartition.cs
src/Models/Models.BiliBili/Partition/SubPartition.cs
+51
-0
src/Models/Models.BiliBili/Tag.cs
src/Models/Models.BiliBili/Tag.cs
+49
-0
src/Models/Models.BiliBili/Video.cs
src/Models/Models.BiliBili/Video.cs
+109
-0
src/ViewModels/ViewModels.Uwp/SubPartitionViewModel/SubPartitionViewModel.Properties.cs
...SubPartitionViewModel/SubPartitionViewModel.Properties.cs
+11
-0
src/ViewModels/ViewModels.Uwp/SubPartitionViewModel/SubPartitionViewModel.cs
...Models.Uwp/SubPartitionViewModel/SubPartitionViewModel.cs
+11
-0
src/ViewModels/ViewModels.Uwp/ViewModels.Uwp.csproj
src/ViewModels/ViewModels.Uwp/ViewModels.Uwp.csproj
+2
-0
未找到文件。
App.ruleset
浏览文件 @
f5fa8faf
<?xml version="1.0" encoding="utf-8"?>
<RuleSet
Name=
"Rules for App"
Description=
"Code analysis rules for App.csproj."
ToolsVersion=
"1
5
.0"
>
<RuleSet
Name=
"Rules for App"
Description=
"Code analysis rules for App.csproj."
ToolsVersion=
"1
6
.0"
>
<Rules
AnalyzerId=
"Microsoft.Analyzers.ManagedCodeAnalysis"
RuleNamespace=
"Microsoft.Rules.Managed"
>
<Rule
Id=
"CA1001"
Action=
"Warning"
/>
<Rule
Id=
"CA1009"
Action=
"Warning"
/>
...
...
@@ -77,6 +77,7 @@
<Rule
Id=
"SA0001"
Action=
"None"
/>
<Rule
Id=
"SA1101"
Action=
"None"
/>
<Rule
Id=
"SA1309"
Action=
"None"
/>
<Rule
Id=
"SA1402"
Action=
"None"
/>
<Rule
Id=
"SA1623"
Action=
"None"
/>
<Rule
Id=
"SA1642"
Action=
"None"
/>
</Rules>
...
...
src/App/App.csproj
浏览文件 @
f5fa8faf
...
...
@@ -55,6 +55,9 @@
<Compile
Include=
"Pages\MyFavoritePage.xaml.cs"
>
<DependentUpon>
MyFavoritePage.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Pages\Overlay\SubPartitionPage.xaml.cs"
>
<DependentUpon>
SubPartitionPage.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Pages\PartitionPage.xaml.cs"
>
<DependentUpon>
PartitionPage.xaml
</DependentUpon>
</Compile>
...
...
@@ -189,6 +192,10 @@
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Pages\Overlay\SubPartitionPage.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Pages\PartitionPage.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
...
...
src/App/Pages/Overlay/SubPartitionPage.xaml
0 → 100644
浏览文件 @
f5fa8faf
<Page
x:Class="Richasy.Bili.App.Pages.Overlay.SubPartitionPage"
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="using:Richasy.Bili.App.Pages.Overlay"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid />
</Page>
src/App/Pages/Overlay/SubPartitionPage.xaml.cs
0 → 100644
浏览文件 @
f5fa8faf
using
Windows.UI.Xaml.Controls
;
namespace
Richasy.Bili.App.Pages.Overlay
{
/// <summary>
/// 子分区页面.
/// </summary>
public
sealed
partial
class
SubPartitionPage
:
Page
{
/// <summary>
/// Initializes a new instance of the <see cref="SubPartitionPage"/> class.
/// </summary>
public
SubPartitionPage
()
{
this
.
InitializeComponent
();
}
}
}
src/Models/Models.BiliBili/Banner.cs
0 → 100644
浏览文件 @
f5fa8faf
// Copyright (c) Richasy. All rights reserved.
using
Newtonsoft.Json
;
namespace
Richasy.Bili.Models.BiliBili
{
/// <summary>
/// 横幅定义.
/// </summary>
[
JsonObject
(
MemberSerialization
=
MemberSerialization
.
OptIn
)]
public
class
Banner
{
/// <summary>
/// 横幅Id.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"id"
,
Required
=
Required
.
Default
)]
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 横幅标题.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"title"
,
Required
=
Required
.
Default
)]
public
string
Title
{
get
;
set
;
}
/// <summary>
/// 横幅图片地址.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"image"
,
Required
=
Required
.
Default
)]
public
string
Image
{
get
;
set
;
}
/// <summary>
/// 哈希特征值.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"hash"
,
Required
=
Required
.
Default
)]
public
string
Hash
{
get
;
set
;
}
/// <summary>
/// 导航地址.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"uri"
,
Required
=
Required
.
Default
)]
public
string
NavigateUri
{
get
;
set
;
}
/// <summary>
/// 对应资源的Id值.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"resource_id"
,
Required
=
Required
.
Default
)]
public
int
ResourceId
{
get
;
set
;
}
/// <summary>
/// 请求Id.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"request_id"
,
Required
=
Required
.
Default
)]
public
string
RequestId
{
get
;
set
;
}
/// <summary>
/// 是否为广告.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"is_ad"
,
Required
=
Required
.
Default
)]
public
bool
IsAD
{
get
;
set
;
}
/// <summary>
/// 在集合中的索引值.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"index"
,
Required
=
Required
.
Default
)]
public
int
Index
{
get
;
set
;
}
}
}
src/Models/Models.BiliBili/Partition.cs
→
src/Models/Models.BiliBili/Partition
/Partition
.cs
浏览文件 @
f5fa8faf
文件已移动
src/Models/Models.BiliBili/Partition/SubPartition.cs
0 → 100644
浏览文件 @
f5fa8faf
// Copyright (c) Richasy. All rights reserved.
using
System.Collections.Generic
;
using
Newtonsoft.Json
;
namespace
Richasy.Bili.Models.BiliBili
{
/// <summary>
/// 子分区类型定义.
/// </summary>
[
JsonObject
(
MemberSerialization
=
MemberSerialization
.
OptIn
)]
public
class
SubPartition
{
/// <summary>
/// 推荐视频列表.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"recommend"
,
Required
=
Required
.
Default
)]
public
List
<
Video
>
RecommendVideos
{
get
;
set
;
}
/// <summary>
/// 新的视频列表.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"new"
,
Required
=
Required
.
Default
)]
public
List
<
Video
>
NewVideos
{
get
;
set
;
}
}
/// <summary>
/// 子分区的推荐模块.
/// </summary>
[
JsonObject
(
MemberSerialization
=
MemberSerialization
.
OptIn
)]
public
class
SubPartitionRecommend
:
SubPartition
{
/// <summary>
/// 横幅.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"banner"
,
Required
=
Required
.
Default
)]
public
RecommendBanner
Banner
{
get
;
set
;
}
/// <summary>
/// 推荐列表下的横幅定义.
/// </summary>
public
class
RecommendBanner
{
/// <summary>
/// 顶层横幅.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"top"
,
Required
=
Required
.
Default
)]
public
List
<
Banner
>
TopBanners
{
get
;
set
;
}
}
}
}
src/Models/Models.BiliBili/Tag.cs
0 → 100644
浏览文件 @
f5fa8faf
// Copyright (c) Richasy. All rights reserved.
using
Newtonsoft.Json
;
namespace
Richasy.Bili.Models.BiliBili
{
/// <summary>
/// 标签类型.
/// </summary>
[
JsonObject
(
MemberSerialization
=
MemberSerialization
.
OptIn
)]
public
class
Tag
{
/// <summary>
/// 标签ID.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"tid"
,
Required
=
Required
.
Default
)]
public
int
TagId
{
get
;
set
;
}
/// <summary>
/// 标签名.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"tname"
,
Required
=
Required
.
Default
)]
public
string
TagName
{
get
;
set
;
}
/// <summary>
/// 所属子分区ID.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"rid"
,
Required
=
Required
.
Default
)]
public
int
SubPartitionId
{
get
;
set
;
}
/// <summary>
/// 所属子分区名称.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"rname"
,
Required
=
Required
.
Default
)]
public
string
SubPartitionName
{
get
;
set
;
}
/// <summary>
/// 所属主分区ID.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"reid"
,
Required
=
Required
.
Default
)]
public
int
PartitionId
{
get
;
set
;
}
/// <summary>
/// 所属主分区名称.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"rename"
,
Required
=
Required
.
Default
)]
public
string
PartitionName
{
get
;
set
;
}
}
}
src/Models/Models.BiliBili/Video.cs
0 → 100644
浏览文件 @
f5fa8faf
// Copyright (c) Richasy. All rights reserved.
using
Newtonsoft.Json
;
namespace
Richasy.Bili.Models.BiliBili
{
/// <summary>
/// 视频基类型.
/// </summary>
[
JsonObject
(
MemberSerialization
=
MemberSerialization
.
OptIn
)]
public
class
Video
{
/// <summary>
/// 视频标题.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"title"
,
Required
=
Required
.
Default
)]
public
string
Title
{
get
;
set
;
}
/// <summary>
/// 视频封面图片地址.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"cover"
,
Required
=
Required
.
Default
)]
public
string
Cover
{
get
;
set
;
}
/// <summary>
/// 视频播放地址.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"uri"
,
Required
=
Required
.
Default
)]
public
string
Uri
{
get
;
set
;
}
/// <summary>
/// 参数,通常指代视频ID.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"param"
,
Required
=
Required
.
Default
)]
public
string
Parameter
{
get
;
set
;
}
/// <summary>
/// 视频类型.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"goto"
,
Required
=
Required
.
Default
)]
public
string
Type
{
get
;
set
;
}
/// <summary>
/// 视频上传者.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"name"
,
Required
=
Required
.
Default
)]
public
string
Publisher
{
get
;
set
;
}
/// <summary>
/// 视频上传者的头像.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"face"
,
Required
=
Required
.
Default
)]
public
string
PublisherAvatar
{
get
;
set
;
}
/// <summary>
/// 视频播放数.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"play"
,
Required
=
Required
.
Default
)]
public
int
PlayCount
{
get
;
set
;
}
/// <summary>
/// 弹幕数.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"danmaku"
,
Required
=
Required
.
Default
)]
public
int
DanmakuCount
{
get
;
set
;
}
/// <summary>
/// 视频评论数.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"reply"
,
Required
=
Required
.
Default
)]
public
int
ReplyCount
{
get
;
set
;
}
/// <summary>
/// 视频收藏数.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"favourite"
,
Required
=
Required
.
Default
)]
public
int
FavouriteCount
{
get
;
set
;
}
/// <summary>
/// 视频发布时间 (Unix时间戳).
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"pubdate"
,
Required
=
Required
.
Default
)]
public
int
PublishDateTime
{
get
;
set
;
}
/// <summary>
/// 视频时长 (秒).
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"duration"
,
Required
=
Required
.
Default
)]
public
int
Duration
{
get
;
set
;
}
/// <summary>
/// 所属分区ID.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"rid"
,
Required
=
Required
.
Default
)]
public
int
PartitionId
{
get
;
set
;
}
/// <summary>
/// 所属分区名称.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"rname"
,
Required
=
Required
.
Default
)]
public
string
PartitionName
{
get
;
set
;
}
/// <summary>
/// 点赞数.
/// </summary>
[
JsonProperty
(
NullValueHandling
=
NullValueHandling
.
Ignore
,
PropertyName
=
"like"
,
Required
=
Required
.
Default
)]
public
int
LikeCount
{
get
;
set
;
}
}
}
src/ViewModels/ViewModels.Uwp/SubPartitionViewModel/SubPartitionViewModel.Properties.cs
0 → 100644
浏览文件 @
f5fa8faf
// Copyright (c) Richasy. All rights reserved.
namespace
Richasy.Bili.ViewModels.Uwp
{
/// <summary>
/// 子分区视图模型属性集.
/// </summary>
public
partial
class
SubPartitionViewModel
{
}
}
src/ViewModels/ViewModels.Uwp/SubPartitionViewModel/SubPartitionViewModel.cs
0 → 100644
浏览文件 @
f5fa8faf
// Copyright (c) Richasy. All rights reserved.
namespace
Richasy.Bili.ViewModels.Uwp
{
/// <summary>
/// 子分区视图模型.
/// </summary>
public
partial
class
SubPartitionViewModel
:
ViewModelBase
{
}
}
src/ViewModels/ViewModels.Uwp/ViewModels.Uwp.csproj
浏览文件 @
f5fa8faf
...
...
@@ -13,6 +13,8 @@
<Compile
Include=
"AppViewModel\AppViewModel.Properties.cs"
/>
<Compile
Include=
"PartitionViewModel\PartitionViewModel.cs"
/>
<Compile
Include=
"PartitionViewModel\PartitionViewModel.Properties.cs"
/>
<Compile
Include=
"SubPartitionViewModel\SubPartitionViewModel.cs"
/>
<Compile
Include=
"SubPartitionViewModel\SubPartitionViewModel.Properties.cs"
/>
<Compile
Include=
"ViewModelBase.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"$(SolutionDir)\src\Shared\SharedAssemblyInfo.cs"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录