5.0 KiB
5.0 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-16T02:49:52.617936+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 7819516e9af4aa9e |
ViewerSettings
1. Purpose
This module defines two Prism-based event types used for broadcasting changes to viewer settings within the DTS application. Specifically, CalibrationBehaviorSettableInViewerChangedEvent signals when the availability (enabled/disabled state) of calibration behavior configuration in the viewer has changed, while ViewerSettingsVisibilityChangedEvent signals when the visibility state of the viewer settings panel has changed. These events facilitate loose coupling between components that manage or respond to viewer configuration state, enabling reactive UI updates or logic adjustments without direct dependencies.
2. Public Interface
-
CalibrationBehaviorSettableInViewerChangedEvent- Inherits from:
CompositePresentationEvent<bool> - Behavior: A Prism event used to publish and subscribe to changes in whether calibration behavior settings are settable (i.e., enabled) in the viewer. The payload is a
bool:trueindicates calibration behavior is settable;falseindicates it is not. - Usage: Published when the underlying logic determines that the user should or should not be allowed to modify calibration behavior via the viewer UI (e.g., due to permissions, mode constraints, or data state).
- Inherits from:
-
ViewerSettingsVisibilityChangedEvent- Inherits from:
CompositePresentationEvent<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). - Usage: Published when the viewer settings panel is shown, hidden, or collapsed—e.g., in response to user actions (toggling a settings button) or application state changes (e.g., entering full-screen mode).
- Inherits from:
3. Invariants
- Both events are purely informational—they carry no side effects beyond notification; subscribers are responsible for any state changes or UI updates.
- The payload for
CalibrationBehaviorSettableInViewerChangedEventis strictly abool, with no defined semantics beyond “settable” (true) vs. “not settable” (false). No intermediate or invalid states are implied. - The payload for
ViewerSettingsVisibilityChangedEventmust be one of the threeVisibilityenum values defined inSystem.Windows, and no other values are expected. - Events are published asynchronously (via Prism’s
CompositePresentationEventsemantics), so subscribers may not receive events in the same call stack as the publisher. - No ordering guarantees are provided between these two events—e.g., a visibility change may occur before or after a settable-state change, and subscribers must handle arbitrary sequences.
4. Dependencies
-
External Dependencies:
Microsoft.Practices.Prism.Events(Prism library for event aggregation).System.Windows(forVisibilitytype used inViewerSettingsVisibilityChangedEvent).
-
Namespace:
- Defined in
DTS.Common.Events, indicating it is part of a shared/common core library (DTS.CommonCore).
- Defined in
-
Inferred Usage:
- Likely consumed by viewer-related UI components (e.g., a settings panel view model or control) and possibly by core logic modules that manage calibration or viewer state.
- No direct reverse dependencies are visible in the source—these are leaf event definitions.
5. Gotchas
- No default value semantics: The source does not specify what the initial value of
CalibrationBehaviorSettableInViewerChangedEventorViewerSettingsVisibilityChangedEventshould be (e.g., whetherfalseorVisibility.Collapsedis the default). Subscribers must not assume an initial state unless documented elsewhere. Visibilityambiguity:Visibilityhas three states (Visible,Collapsed,Hidden), but the source does not clarify whether all three are intentionally used or whether onlyVisible/Collapsedare expected. Misuse (e.g., publishingHiddenwhen onlyCollapsedis handled) could cause subtle UI inconsistencies.- No deprecation or versioning markers: The events lack attributes or comments indicating planned obsolescence, migration paths, or versioning—though this may be handled at a higher architectural layer.
- Namespace consistency: The
// ReSharper disable CheckNamespacedirective suggests the namespace is intentionallyDTS.Common.Events(not nested underDTS.CommonCore.Events), which may conflict with folder structure expectations. Developers should verify expected namespace usage. - None identified from source alone.