fix(wpf): 修改任务名过滤换行

This commit is contained in:
status102
2026-02-28 18:22:48 +08:00
parent c519057331
commit 2e60fb3689

View File

@@ -1319,7 +1319,7 @@ public class TaskQueueViewModel : Screen
}
var taskType = ConfigFactory.CurrentConfig.TaskQueue[taskItem.Index].TaskType;
var currentName = taskItem.Name;
var currentName = taskItem.Name.Replace("\r", string.Empty).Replace("\n", string.Empty);
var dialog = new Views.Dialogs.TextDialogUserControl(
LocalizationHelper.GetString("RenameTask") + $" {taskItem.Index + 1}-{LocalizationHelper.GetString(taskType.ToString())}",
LocalizationHelper.GetString("RenameTaskPrompt"),
@@ -1331,7 +1331,7 @@ public class TaskQueueViewModel : Screen
if (result == true && !string.IsNullOrWhiteSpace(dialog.InputText))
{
var newName = dialog.InputText.Trim();
var newName = dialog.InputText.Trim().Replace("\r", string.Empty).Replace("\n", string.Empty);
taskItem.Name = newName;
if (taskItem.Index < ConfigFactory.CurrentConfig.TaskQueue.Count)
{