|
|
@ -20,6 +20,13 @@ namespace DownKyi.ViewModels.Settings
|
|
|
|
|
|
|
|
|
|
|
|
#region 页面属性申明
|
|
|
|
#region 页面属性申明
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private bool useSSL;
|
|
|
|
|
|
|
|
public bool UseSSL
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get => useSSL;
|
|
|
|
|
|
|
|
set => SetProperty(ref useSSL, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private bool builtin;
|
|
|
|
private bool builtin;
|
|
|
|
public bool Builtin
|
|
|
|
public bool Builtin
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -236,6 +243,10 @@ namespace DownKyi.ViewModels.Settings
|
|
|
|
|
|
|
|
|
|
|
|
isOnNavigatedTo = true;
|
|
|
|
isOnNavigatedTo = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 启用https
|
|
|
|
|
|
|
|
AllowStatus useSSL = SettingsManager.GetInstance().UseSSL();
|
|
|
|
|
|
|
|
UseSSL = useSSL == AllowStatus.YES;
|
|
|
|
|
|
|
|
|
|
|
|
// 选择下载器
|
|
|
|
// 选择下载器
|
|
|
|
var downloader = SettingsManager.GetInstance().GetDownloader();
|
|
|
|
var downloader = SettingsManager.GetInstance().GetDownloader();
|
|
|
|
switch (downloader)
|
|
|
|
switch (downloader)
|
|
|
@ -304,6 +315,21 @@ namespace DownKyi.ViewModels.Settings
|
|
|
|
|
|
|
|
|
|
|
|
#region 命令申明
|
|
|
|
#region 命令申明
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 是否启用https事件
|
|
|
|
|
|
|
|
private DelegateCommand useSSLCommand;
|
|
|
|
|
|
|
|
public DelegateCommand UseSSLCommand => useSSLCommand ?? (useSSLCommand = new DelegateCommand(ExecuteUseSSLCommand));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 是否启用https事件
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
private void ExecuteUseSSLCommand()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AllowStatus useSSL = UseSSL ? AllowStatus.YES : AllowStatus.NO;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isSucceed = SettingsManager.GetInstance().UseSSL(useSSL);
|
|
|
|
|
|
|
|
PublishTip(isSucceed);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 下载器选择事件
|
|
|
|
// 下载器选择事件
|
|
|
|
private DelegateCommand<string> selectDownloaderCommand;
|
|
|
|
private DelegateCommand<string> selectDownloaderCommand;
|
|
|
|
public DelegateCommand<string> SelectDownloaderCommand => selectDownloaderCommand ?? (selectDownloaderCommand = new DelegateCommand<string>(ExecuteSelectDownloaderCommand));
|
|
|
|
public DelegateCommand<string> SelectDownloaderCommand => selectDownloaderCommand ?? (selectDownloaderCommand = new DelegateCommand<string>(ExecuteSelectDownloaderCommand));
|
|
|
|