调度器添加地图追踪文件时自动聚焦搜索框Update ScriptControlViewModel.cs (#1916)

This commit is contained in:
Arkadegong
2025-07-23 23:50:31 +08:00
committed by GitHub
parent b2eacb8cd4
commit 976a1591c7

View File

@@ -852,6 +852,8 @@ public partial class ScriptControlViewModel : ViewModel
Margin = new Thickness(0, 0, 0, 10),
PlaceholderText = "输入筛选条件...",
};
// 设置文本框自动聚焦
filterTextBox.Loaded += (s, e) => filterTextBox.Focus();
filterTextBox.TextChanged += delegate { ApplyFilter(stackPanel, list, filterTextBox.Text, excludeCheckBox.IsChecked); };
excludeCheckBox.Click += delegate { ApplyFilter(stackPanel, list, filterTextBox.Text, excludeCheckBox.IsChecked); };
stackPanel.Children.Add(filterTextBox);
@@ -1859,4 +1861,4 @@ public partial class ScriptControlViewModel : ViewModel
}
}
}