Order of files to modify when adding / deleting checklist items (arranged by dependency)
1. Models/UILangProviderM.cs Add multilingual string keys (en / zh-cn / zh-tw three copies) for new entries.
2. Models/ChecklistProviderM.cs Add or remove ChecklistItemDefinitionM in the corresponding method (e.g., GetToolsChecklist()).
-
If the new item is a picked item that requires external driving, add the corresponding constant index (e.g.,
UpstreamPickedChecklistIndex = 3) and update method (e.g.,SetToolPickedStatus). -
If it is just a static check item, usually no changes are needed (
FillCollectionis automatically populated fromChecklistProviderM).
In Execute, after ResetSelection for the corresponding Zone, call the VM's update method to modify the checklist Status.
-
UpdateEncodingStartButtonsState()— Adds a new conditional check. -
InitializeChecklistEntryStates()— If the entry needs to be enabled/disabled based on configuration. -
SubToToolsChecklist()/UnsubFromToolsChecklist()— If the checklist for a new card needs to listen for status changes. -
RefreshCardsLanguage()— If a new card has been added to the VM.
Add a new <comps:ValidationCard> or <comps:ChecklistContainer> and bind it to the DataContext.
Lang → Provider → VM → Cmd → MainVM → XAML
增删 Checklist 需要修改的文件顺序(按依赖关系排列):
为新的条目添加多语言字符串 key(en / zh-cn / zh-tw 三份)
在对应方法(如 GetToolsChecklist())中添加或移除 ChecklistItemDefinitionM
- 如果新增的是 picked 这类需要外部驱动的条目,添加对应常量下标(如
UpstreamPickedChecklistIndex = 3)和更新方法(如SetToolPickedStatus) - 如果只是静态检查项,通常无需改动(
FillCollection已自动从ChecklistProviderM填充)
在 Execute 中,对应 Zone 的 ResetSelection 之后,调用 VM 的更新方法修改 checklist Status
UpdateEncodingStartButtonsState()— 加入新的条件判断InitializeChecklistEntryStates()— 如果该条目需要根据配置启用/禁用SubToToolsChecklist()/UnsubFromToolsChecklist()— 如果新卡片的 checklist 需要监听状态变化RefreshCardsLanguage()— 如果新增了卡片 VM
加入新的 <comps:ValidationCard> 或 <comps:ChecklistContainer> 并绑定 DataContext
Lang → Provider → VM → Cmd → MainVM → XAML