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;
-
- //SetView();
-
- OnCurrentChanged(current);
+ bool isSuccess = OnCurrentChanged(current, value);
+ if (isSuccess)
+ {
+ current = value;
- 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 0000000..6377dca
Binary files /dev/null and b/DownKyi/Resources/play.png differ
diff --git a/DownKyi/Resources/time.png b/DownKyi/Resources/time.png
new file mode 100644
index 0000000..25c18ed
Binary files /dev/null and b/DownKyi/Resources/time.png differ
diff --git a/DownKyi/ViewModels/PageViewModels/PublicationMedia.cs b/DownKyi/ViewModels/PageViewModels/PublicationMedia.cs
new file mode 100644
index 0000000..f7c2636
--- /dev/null
+++ b/DownKyi/ViewModels/PageViewModels/PublicationMedia.cs
@@ -0,0 +1,71 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using System.Windows.Media.Imaging;
+
+namespace DownKyi.ViewModels.PageViewModels
+{
+ public class PublicationMedia : BindableBase
+ {
+ public long Avid { get; set; }
+ public string Bvid { get; set; }
+
+ private bool isSelected;
+ public bool IsSelected
+ {
+ get => 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