feat: 添加文件已存在自动重命名的开关 Fixes: #27 Fixes: #21

This commit is contained in:
姚彪
2024-02-04 21:49:24 +08:00
parent 6fce331de4
commit d2db8d7877
7 changed files with 87 additions and 5 deletions

View File

@@ -81,6 +81,14 @@ public class ViewBasicViewModel : ViewModelBase
get => _autoDownloadAll;
set => SetProperty(ref _autoDownloadAll, value);
}
private bool _repeatFileAutoAddNumberSuffix;
public bool RepeatFileAutoAddNumberSuffix
{
get => _repeatFileAutoAddNumberSuffix;
set => SetProperty(ref _repeatFileAutoAddNumberSuffix, value);
}
private List<RepeatDownloadStrategyDisplay> _repeatDownloadStrategy;
@@ -260,13 +268,23 @@ public class ViewBasicViewModel : ViewModelBase
PublishTip(isSucceed);
}
// 解析范围事件
private DelegateCommand? _repeatFileAutoAddNumberSuffixCommand;
public DelegateCommand RepeatFileAutoAddNumberSuffixCommand => _repeatFileAutoAddNumberSuffixCommand ??= new DelegateCommand(ExecuteRepeatFileAutoAddNumberSuffixCommand);
private void ExecuteRepeatFileAutoAddNumberSuffixCommand()
{
var isSucceed = SettingsManager.GetInstance().IsRepeatFileAutoAddNumberSuffix(RepeatFileAutoAddNumberSuffix);
PublishTip(isSucceed);
}
// 重复下载策略事件
private DelegateCommand<object>? _repeatDownloadStrategyCommand;
public DelegateCommand<object> RepeatDownloadStrategyCommand => _repeatDownloadStrategyCommand ??= new DelegateCommand<object>(ExecuteRepeatDownloadStrategyCommand);
/// <summary>
/// 解析范围事件
/// 重复下载策略事件
/// </summary>
/// <param name="parameter"></param>
private void ExecuteRepeatDownloadStrategyCommand(object parameter)