1.9 KiB
UC1 tree event parity
Source evidence is the read-only original
C:\Users\MD\source\repos\MBN_STOCK_N\MBN_STOCK_N\Control\UC1.cs:
UC1_LoadchecksExpand, selects the first rendered root, and callsEnsureVisible.treeView_MouseDown,treeView_BeforeExpand, andtreeView_BeforeCollapseprevent a double-click from also changing a root's expanded state.treeView_DoubleClickactivates either the selected leaf or every direct child of the selected root.chE_CheckedChangedexpands or collapses every root. Collapsing does not clearSelectedNode.
The WebView tree therefore owns only presentation state (open roots, selected
node, focused node, and scroll position). C# remains the authority for every
leaf/root action. A root label click selects without expanding; only its
disclosure glyph changes open. A root or leaf double-click emits one closed
native intent and does not invoke the browser's whole-summary toggle.
On each real tab activation/re-entry the presentation state is recreated like
the original UC1: Expand is checked, all sections are open, and the first
root is selected, focused, and scrolled into view. State-only renders within
the same activation preserve per-section open state, selection, focus, and
scroll position. Busy and fixed-section-batch states reject both actions and
local expand/collapse changes.
Intentional defect exclusion
The original treeView_DoubleClick reads uc_3.FpSpread in the parent-node
path before checking which UC1 file is active. For UC1 instances constructed
with uc_3 == null, that can throw NullReferenceException; the surrounding
empty catch silently drops the operator action. This is an original defect,
not observable intended behavior, so the migration does not reproduce it.
The WebView sends only the selected root identity and C# validates/materializes
the corresponding section without dereferencing an unrelated comparison
control.