4.0 KiB
4.0 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-16T03:26:29.245992+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | aa456ba674677929 |
ViewerSettings
1. Purpose
This module defines two Prism-based pub/sub events used for broadcasting changes to viewer settings in the DTS system: one signaling whether calibration behavior is settable in the viewer (CalibrationBehaviorSettableInViewerChangedEvent), and another signaling changes to the visibility state of the viewer settings UI (ViewerSettingsVisibilityChangedEvent). These events enable decoupled communication between components—e.g., view models or services—responsible for managing viewer configuration and UI state, allowing subscribers to react to runtime updates without tight coupling.
2. Public Interface
-
CalibrationBehaviorSettableInViewerChangedEvent- Inherits from:
PubSubEvent<bool> - Behavior: A Prism event used to publish and subscribe to changes in whether the calibration behavior settings are editable within the viewer. The payload is a
bool:trueindicates calibration behavior is settable in the viewer;falseindicates it is not.
- Inherits from:
-
ViewerSettingsVisibilityChangedEvent- Inherits from:
PubSubEvent<Visibility> - Behavior: A Prism event used to publish and subscribe to changes in the visibility of the viewer settings panel. The payload is a
System.Windows.Visibilityvalue (Visible,Collapsed, orHidden), reflecting the current UI state of the settings panel.
- Inherits from:
3. Invariants
CalibrationBehaviorSettableInViewerChangedEventpayloads must be strictlytrueorfalse; no null or intermediate values are possible (sinceboolis non-nullable).ViewerSettingsVisibilityChangedEventpayloads must be one of the threeVisibilityenum values defined inSystem.Windows:Visible,Collapsed, orHidden.- Events are published only when the respective state actually changes; no redundant or duplicate publications are implied by the source (though enforcement of this is outside the scope of the event definitions themselves).
- No ordering guarantees are specified or implied between these two events; they are independent.
4. Dependencies
- Dependencies of this module:
Prism.Events(specificallyPubSubEvent<T>), indicating reliance on the Prism library for event aggregation.System.Windows(only forViewerSettingsVisibilityChangedEvent, viaVisibility).
- Dependencies on this module:
- Not inferable from the provided source files alone. However, any consumer (e.g., view models, services) that needs to react to viewer settings changes or calibration behavior availability must subscribe to these events via the Prism
IEventAggregator. - These events are likely published by components managing viewer configuration state (e.g., a viewer settings view model or calibration service), but such publishers are not visible in this source.
- Not inferable from the provided source files alone. However, any consumer (e.g., view models, services) that needs to react to viewer settings changes or calibration behavior availability must subscribe to these events via the Prism
5. Gotchas
- Namespace flattening: The
// ReSharper disable CheckNamespacedirective suggests the namespace is intentionallyDTS.Common.Events(not nested under a more specific sub-namespace), possibly to avoid deep nesting in legacy or tooling-constrained contexts. - No validation in event definition: The events themselves do not enforce semantics (e.g., that
Visibility.CollapsedandVisibility.Hiddenare treated differently); interpretation of payload values is deferred to subscribers. - No documentation comments: The source lacks XML documentation comments, so semantic meaning (e.g., why calibration behavior might be settable or not) is not embedded here—consumers must infer intent from usage.
- No versioning or deprecation markers: No indication of whether these events are stable, experimental, or scheduled for change.
- None identified from source alone.