diff --git a/DownKyi/PrismExtension/Dialog/DialogWindow.axaml b/DownKyi/PrismExtension/Dialog/DialogWindow.axaml
index e7e798d..7884021 100644
--- a/DownKyi/PrismExtension/Dialog/DialogWindow.axaml
+++ b/DownKyi/PrismExtension/Dialog/DialogWindow.axaml
@@ -5,18 +5,23 @@
Title="{Binding Title}"
WindowStartupLocation="CenterOwner">
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DownKyi/Themes/Colors/ColorDark.axaml b/DownKyi/Themes/Colors/ColorDark.axaml
index fdc67a1..dbfee3b 100644
--- a/DownKyi/Themes/Colors/ColorDark.axaml
+++ b/DownKyi/Themes/Colors/ColorDark.axaml
@@ -1,7 +1,7 @@
Black
- Black
+ white
#7FD0D0D0
white
black
@@ -16,7 +16,7 @@
#FF00A1D6
#7FD0D0D0
#7FD0D0D0
- white
+ Black
white
#FF141414
diff --git a/DownKyi/ViewModels/ViewDownloadManagerViewModel.cs b/DownKyi/ViewModels/ViewDownloadManagerViewModel.cs
index 17ae3d3..d0ca4aa 100644
--- a/DownKyi/ViewModels/ViewDownloadManagerViewModel.cs
+++ b/DownKyi/ViewModels/ViewDownloadManagerViewModel.cs
@@ -18,28 +18,20 @@ public class ViewDownloadManagerViewModel : ViewModelBase
#region 页面属性申明
- private VectorImage arrowBack;
-
- public VectorImage ArrowBack
- {
- get => arrowBack;
- set => SetProperty(ref arrowBack, value);
- }
-
- private List tabHeaders;
+ private List _tabHeaders;
public List TabHeaders
{
- get => tabHeaders;
- set => SetProperty(ref tabHeaders, value);
+ get => _tabHeaders;
+ set => SetProperty(ref _tabHeaders, value);
}
- private int selectTabId;
+ private int _selectTabId;
public int SelectTabId
{
- get => selectTabId;
- set => SetProperty(ref selectTabId, value);
+ get => _selectTabId;
+ set => SetProperty(ref _selectTabId, value);
}
#endregion
@@ -51,9 +43,6 @@ public class ViewDownloadManagerViewModel : ViewModelBase
#region 属性初始化
- ArrowBack = NavigationIcon.Instance().ArrowBack;
- ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
-
TabHeaders = new List
{
new()
@@ -107,7 +96,7 @@ public class ViewDownloadManagerViewModel : ViewModelBase
return;
}
- NavigationParameters param = new NavigationParameters();
+ var param = new NavigationParameters();
switch (tabHeader.Id)
{
@@ -136,7 +125,5 @@ public class ViewDownloadManagerViewModel : ViewModelBase
SelectTabId = 0;
PropertyChangeAsync(() => { regionManager.RequestNavigate("DownloadManagerContentRegion", ViewDownloadingViewModel.Tag, new NavigationParameters()); });
-
- ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
}
}
\ No newline at end of file
diff --git a/DownKyi/ViewModels/ViewLoginViewModel.cs b/DownKyi/ViewModels/ViewLoginViewModel.cs
index b5ac52c..7eb2821 100644
--- a/DownKyi/ViewModels/ViewLoginViewModel.cs
+++ b/DownKyi/ViewModels/ViewLoginViewModel.cs
@@ -5,7 +5,6 @@ using Avalonia.Media.Imaging;
using DownKyi.Core.BiliApi.Login;
using DownKyi.Core.Logging;
using DownKyi.Events;
-using DownKyi.Images;
using DownKyi.Utils;
using Prism.Commands;
using Prism.Events;
@@ -22,14 +21,6 @@ public class ViewLoginViewModel : ViewModelBase
#region 页面属性申明
- private VectorImage _arrowBack;
-
- public VectorImage ArrowBack
- {
- get => _arrowBack;
- set => SetProperty(ref _arrowBack, value);
- }
-
private Bitmap? _loginQrCode;
public Bitmap? LoginQrCode
@@ -60,9 +51,6 @@ public class ViewLoginViewModel : ViewModelBase
{
#region 属性初始化
- ArrowBack = NavigationIcon.Instance().ArrowBack;
- ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
-
#endregion
}
@@ -78,7 +66,7 @@ public class ViewLoginViewModel : ViewModelBase
// 结束任务
_tokenSource.Cancel();
- NavigationParam parameter = new NavigationParam
+ var parameter = new NavigationParam
{
ViewName = ParentView,
ParentViewName = null,
@@ -131,7 +119,7 @@ public class ViewLoginViewModel : ViewModelBase
///
private void GetLoginStatus(string oauthKey)
{
- CancellationToken cancellationToken = _tokenSource.Token;
+ var cancellationToken = _tokenSource.Token;
while (true)
{
Thread.Sleep(1000);
@@ -196,7 +184,7 @@ public class ViewLoginViewModel : ViewModelBase
// 保存登录信息
try
{
- bool isSucceed = LoginHelper.SaveLoginInfoCookies(loginStatus.Data.Url);
+ var isSucceed = LoginHelper.SaveLoginInfoCookies(loginStatus.Data.Url);
if (!isSucceed)
{
EventAggregator.GetEvent()
@@ -236,8 +224,6 @@ public class ViewLoginViewModel : ViewModelBase
///
private void InitStatus()
{
- ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
-
LoginQrCode = null;
LoginQrCodeOpacity = 1;
LoginQrCodeStatus = false;
diff --git a/DownKyi/ViewModels/ViewToolboxViewModel.cs b/DownKyi/ViewModels/ViewToolboxViewModel.cs
index e7fbb53..9e3fd92 100644
--- a/DownKyi/ViewModels/ViewToolboxViewModel.cs
+++ b/DownKyi/ViewModels/ViewToolboxViewModel.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using DownKyi.Events;
-using DownKyi.Images;
using DownKyi.Utils;
using DownKyi.ViewModels.PageViewModels;
using DownKyi.ViewModels.Toolbox;
@@ -18,28 +17,20 @@ namespace DownKyi.ViewModels
#region 页面属性申明
- private VectorImage arrowBack;
-
- public VectorImage ArrowBack
- {
- get => arrowBack;
- set => SetProperty(ref arrowBack, value);
- }
-
- private List tabHeaders;
+ private List _tabHeaders;
public List TabHeaders
{
- get => tabHeaders;
- set => SetProperty(ref tabHeaders, value);
+ get => _tabHeaders;
+ set => SetProperty(ref _tabHeaders, value);
}
- private int selectTabId;
+ private int _selectTabId;
public int SelectTabId
{
- get => selectTabId;
- set => SetProperty(ref selectTabId, value);
+ get => _selectTabId;
+ set => SetProperty(ref _selectTabId, value);
}
#endregion
@@ -51,9 +42,6 @@ namespace DownKyi.ViewModels
#region 属性初始化
- ArrowBack = NavigationIcon.Instance().ArrowBack;
- ArrowBack.Fill = DictionaryResource.GetColor("ColorTextDark");
-
TabHeaders = new List
{
new() { Id = 0, Title = DictionaryResource.GetString("BiliHelper") },
@@ -67,17 +55,16 @@ namespace DownKyi.ViewModels
#region 命令申明
// 返回事件
- private DelegateCommand backSpaceCommand;
+ private DelegateCommand? _backSpaceCommand;
- public DelegateCommand BackSpaceCommand =>
- backSpaceCommand ?? (backSpaceCommand = new DelegateCommand(ExecuteBackSpace));
+ public DelegateCommand BackSpaceCommand => _backSpaceCommand ??= new DelegateCommand(ExecuteBackSpace);
///
/// 返回事件
///
private void ExecuteBackSpace()
{
- NavigationParam parameter = new NavigationParam
+ var parameter = new NavigationParam
{
ViewName = ParentView,
ParentViewName = null,
@@ -87,12 +74,9 @@ namespace DownKyi.ViewModels
}
// 左侧tab点击事件
- private DelegateCommand