From fe9c9ff415a6877417ade24fedadbbcd926efcc3 Mon Sep 17 00:00:00 2001
From: croire <1432593898@qq.com>
Date: Sun, 27 Feb 2022 16:35:34 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90Publication=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DownKyi/App.xaml.cs | 2 +
DownKyi/CustomControl/CustomPagerViewModel.cs | 27 +-
DownKyi/DownKyi.csproj | 3 +
DownKyi/Languages/Default.xaml | 2 +
DownKyi/Resources/play.png | Bin 0 -> 229 bytes
DownKyi/Resources/time.png | Bin 0 -> 269 bytes
.../PageViewModels/PublicationMedia.cs | 71 ++++
.../ViewDownloadManagerViewModel.cs | 2 +
DownKyi/ViewModels/ViewLoginViewModel.cs | 4 +-
.../ViewPublicFavoritesViewModel.cs | 7 +
.../ViewModels/ViewPublicationViewModel.cs | 326 +++++++++++++++++-
DownKyi/ViewModels/ViewSettingsViewModel.cs | 2 +
DownKyi/ViewModels/ViewToolboxViewModel.cs | 2 +
.../ViewModels/ViewVideoDetailViewModel.cs | 2 +
DownKyi/Views/ViewPublication.xaml | 185 +++++++++-
DownKyi/Views/ViewUserSpace.xaml | 2 +-
16 files changed, 592 insertions(+), 45 deletions(-)
create mode 100644 DownKyi/Resources/play.png
create mode 100644 DownKyi/Resources/time.png
create mode 100644 DownKyi/ViewModels/PageViewModels/PublicationMedia.cs
diff --git a/DownKyi/App.xaml.cs b/DownKyi/App.xaml.cs
index b82f7a6..1a7b79c 100644
--- a/DownKyi/App.xaml.cs
+++ b/DownKyi/App.xaml.cs
@@ -198,6 +198,8 @@ namespace DownKyi
///
public static void PropertyChangeAsync(Action callback)
{
+ if (Current == null) { return; }
+
Current.Dispatcher.Invoke(callback);
}
diff --git a/DownKyi/CustomControl/CustomPagerViewModel.cs b/DownKyi/CustomControl/CustomPagerViewModel.cs
index 9c632de..07034fb 100644
--- a/DownKyi/CustomControl/CustomPagerViewModel.cs
+++ b/DownKyi/CustomControl/CustomPagerViewModel.cs
@@ -16,11 +16,18 @@ namespace DownKyi.CustomControl
public event PropertyChangedEventHandler PropertyChanged;
// Current修改的回调
- public delegate void CurrentChangedHandler(int current);
+ public delegate bool CurrentChangedHandler(int old, int current);
public event CurrentChangedHandler CurrentChanged;
- protected virtual void OnCurrentChanged(int current)
+ protected virtual bool OnCurrentChanged(int old, int current)
{
- CurrentChanged?.Invoke(current);
+ if (CurrentChanged == null)
+ {
+ return false;
+ }
+ else
+ {
+ return CurrentChanged.Invoke(old, current);
+ }
}
// Count修改的回调
@@ -65,8 +72,6 @@ namespace DownKyi.CustomControl
if (count == 1) { Visibility = Visibility.Hidden; }
else { Visibility = Visibility.Visible; }
- //SetView();
-
OnCountChanged(count);
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Count"));
@@ -90,13 +95,13 @@ namespace DownKyi.CustomControl
}
else
{
- current = value;
+ bool isSuccess = OnCurrentChanged(current, value);
+ if (isSuccess)
+ {
+ current = value;
- //SetView();
-
- OnCurrentChanged(current);
-
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Current"));
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Current"));
+ }
}
}
}
diff --git a/DownKyi/DownKyi.csproj b/DownKyi/DownKyi.csproj
index 84ab117..de0a921 100644
--- a/DownKyi/DownKyi.csproj
+++ b/DownKyi/DownKyi.csproj
@@ -102,6 +102,7 @@
+
@@ -514,6 +515,8 @@
+
+
PreserveNewest
diff --git a/DownKyi/Languages/Default.xaml b/DownKyi/Languages/Default.xaml
index 40dd37b..ddbc76c 100644
--- a/DownKyi/Languages/Default.xaml
+++ b/DownKyi/Languages/Default.xaml
@@ -63,6 +63,7 @@
全部
投稿视频
频道
+ 请稍等,马上就好~
收藏夹
@@ -71,6 +72,7 @@
下载选中项
下载全部
+ 请稍等,马上就好~
复制封面图片
diff --git a/DownKyi/Resources/play.png b/DownKyi/Resources/play.png
new file mode 100644
index 0000000000000000000000000000000000000000..6377dca55be3faa236ffbf8ac24ff18b47824c64
GIT binary patch
literal 229
zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s1|(OmDOUqhYdl>XLnNjq*Zg?WdcN^-dRpD@
zf3aPR><=D2sd<)=IqBSvg0It-{}4IE;K3}s%c;z4+xHtH%~uQ;a;vrdK3Qpb^H-CP
z)AVFV@r0C=KZgz+*zolB_WU$=zt|ZC-!EPkm?6`4vcSBk(6+RA16Sy@$#Kn>Q+7!2
zubu2>F6sR7|NsA$a<;WEH&ng0>v?b_z^4A`GI#s>zd}dSq=k2_FVtjdH`YkozzVdO
d-FtEgL&kjH={yyYtUz}&c)I$ztaD0e0szO^VDtb0
literal 0
HcmV?d00001
diff --git a/DownKyi/Resources/time.png b/DownKyi/Resources/time.png
new file mode 100644
index 0000000000000000000000000000000000000000..25c18ed8a3ede2fb858ca114e13799bfed2d344a
GIT binary patch
literal 269
zcmV+o0rLKdP)^gLO#h*Wa
zxEas@3k%CvH#^G+c^QccAR6ZpLLYG61OqYXEr=n*xw6$Tor0fjJ9TZ+ZId`*$fqHgIurJ_FkT3OZt(
z1X9QJ|NnnhP&k7^0iR-!JV+fABO~K)P^389n8$&_8=GQ~I7l9(j isSelected;
+ set => SetProperty(ref isSelected, value);
+ }
+
+ private BitmapImage cover;
+ public BitmapImage Cover
+ {
+ get => cover;
+ set => SetProperty(ref cover, value);
+ }
+
+ private string title;
+ public string Title
+ {
+ get => title;
+ set => SetProperty(ref title, value);
+ }
+
+ private string duration;
+ public string Duration
+ {
+ get => duration;
+ set => SetProperty(ref duration, value);
+ }
+
+ private string playNumber;
+ public string PlayNumber
+ {
+ get => playNumber;
+ set => SetProperty(ref playNumber, value);
+ }
+
+ private string createTime;
+ public string CreateTime
+ {
+ get => createTime;
+ set => SetProperty(ref createTime, value);
+ }
+
+ // 视频标题点击事件
+ private DelegateCommand